Last modified: 2011-06-05 12:28:33 UTC
Is the parser output only partially used? $parser->mOutput->addHeadItem( self::buildHeadItem( $geshi ), "source-{$lang}" );
Not sure I understand this; geshi syntax highlighting isn't used on this page that I can see, so it's not surprising that the geshi styles aren't being pulled in?
When using <source> tags in review comments, they are not coloured.
The HTML output for comments is fetched via $wgOut->parse(), which throws away any head items or ResourceLoader modules specified in the ParserOutput object. Without redoing the entire output code for the code review pages, this might work: * change out $wgOut->parse() for * call $wgOut->addParserOutputNoText($parserOutput) to add styles/etc ** note this will pass through language links and category links as well. Alternate: just do the head items/addModules but this feels icky. * fetch the HTML with $parserOutput->getText() and use as before
*** Bug 27710 has been marked as a duplicate of this bug. ***
(In reply to comment #3) > The HTML output for comments is fetched via $wgOut->parse(), which throws away > any head items or ResourceLoader modules specified in the ParserOutput object. > > Without redoing the entire output code for the code review pages, this might > work: > > * change out $wgOut->parse() for > * call $wgOut->addParserOutputNoText($parserOutput) to add styles/etc > ** note this will pass through language links and category links as well. > Alternate: just do the head items/addModules but this feels icky. > * fetch the HTML with $parserOutput->getText() and use as before Care to elaborate a bit more Brion? Was just looking at this, and the idea doesn't seem complete... ie Which parser output instance you are using, etc Ta! :)