Update for r23553, r23554

This commit is contained in:
Rob Church 2007-06-29 13:57:08 +00:00
parent 44c0c3c72c
commit 27ffb0306c
2 changed files with 3 additions and 3 deletions

View file

@ -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;
}
}

View file

@ -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';
/**