Index: trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php |
— | — | @@ -185,6 +185,7 @@ |
186 | 186 | */ |
187 | 187 | public static function viewHook( $text, $title, $output ) { |
188 | 188 | // Determine the language |
| 189 | + $matches = array(); |
189 | 190 | preg_match( '!\.(css|js)$!u', $title->getText(), $matches ); |
190 | 191 | $lang = $matches[1] == 'css' ? 'css' : 'javascript'; |
191 | 192 | // Attempt to format |
— | — | @@ -233,6 +234,7 @@ |
234 | 235 | private static function buildHeadItem( $geshi ) { |
235 | 236 | global $wgUseSiteCss, $wgSquidMaxage; |
236 | 237 | $lang = $geshi->language; |
| 238 | + $css = array(); |
237 | 239 | $css[] = '<style type="text/css">/*<![CDATA[*/'; |
238 | 240 | $css[] = ".source-$lang {line-height: normal;}"; |
239 | 241 | $css[] = ".source-$lang li, .source-$lang pre {"; |