mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-11-15 02:24:07 +00:00
Update for r23553, r23554
This commit is contained in:
parent
44c0c3c72c
commit
27ffb0306c
|
@ -77,7 +77,7 @@ class SyntaxHighlight_GeSHi {
|
|||
* @param OutputPage $output
|
||||
* @return bool
|
||||
*/
|
||||
public static function viewHook( &$text, $title, $output ) {
|
||||
public static function viewHook( $text, $title, $output ) {
|
||||
// Determine the language
|
||||
preg_match( '!\.(css|js)$!u', $title->getText(), $matches );
|
||||
$lang = $matches[1] == 'css' ? 'css' : 'javascript';
|
||||
|
@ -88,7 +88,7 @@ class SyntaxHighlight_GeSHi {
|
|||
if( !$geshi->error() ) {
|
||||
// Done
|
||||
$output->addHeadItem( "source-$lang", self::buildHeadItem( $geshi ) );
|
||||
$text = $out;
|
||||
$output->addHtml( "<div dir=\"ltr\">{$out}</div>" );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ $wgExtensionCredits['parserhook']['SyntaxHighlight_GeSHi'] = array(
|
|||
);
|
||||
|
||||
$wgAutoloadClasses['SyntaxHighlight_GeSHi'] = dirname( __FILE__ ) . '/SyntaxHighlight_GeSHi.class.php';
|
||||
$wgHooks['ShowRawCssJs'][] = 'SyntaxHighlight_GeSHi::viewHook';//array( 'SyntaxHighlight_GeSHi', 'viewHook' );
|
||||
$wgHooks['ShowRawCssJs'][] = 'SyntaxHighlight_GeSHi::viewHook';
|
||||
$wgExtensionFunctions[] = 'efSyntaxHighlight_GeSHiSetup';
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue