User blog comment:Kirkburn/Syntax highlighting - helping you read and write code/@comment-452-20150325214849/@comment-452-20150327171619

I just realised that there was one thing missing in my recap:

Currently: static public function isCodeSyntaxHighlightingEnabled( Title $articleTitle ) { global $wgEnableEditorSyntaxHighlighting; return self::isCodePage( $articleTitle ) && $wgEnableEditorSyntaxHighlighting; } static public function isWikitextSyntaxHighlightingEnabled { global $wgEnableEditorSyntaxHighlighting, $wgUser; return $wgEnableEditorSyntaxHighlighting && !$wgUser->getOption( 'disablesyntaxhighlighting' ); } Better: static public function isCodeSyntaxHighlightingEnabled( Title $articleTitle ) { global $wgEnableEditorSyntaxHighlighting; return self::isCodePage( $articleTitle ) && $wgEnableEditorSyntaxHighlighting && !$wgUser->getOption( 'disablesyntaxhighlighting' ); } static public function isWikitextSyntaxHighlightingEnabled { global $wgEnableEditorSyntaxHighlighting, $wgUser; return $wgEnableEditorSyntaxHighlighting && !$wgUser->getOption( 'disablesyntaxhighlighting' ); }