Last modified: 2012-05-09 19:08:49 UTC
Currently highlight.php converts tab characters into spaces, which is not a big deal, but it's somewhat annoying, especially given how the MediaWiki convention is to indent code with tabs instead of spaces. Compare: http://noc.wikimedia.org/conf/CommonSettings.php.txt to: http://noc.wikimedia.org/conf/highlight.php?file=CommonSettings.php In the very first if() loop on the file, you'll notice that in the original (.txt) version, the three lines are indented with a tab character. However, highlight.php converts the tabs to spaces, because it uses highlight_file() internally. This is very easy to fix. I fixed it by adding the following line: $hl = str_replace( ' ', ' ', $hl ); // convert 4 spaces to 1 tab character; bug #NNNNN right after the line: $hl = str_replace( ' ', ' ', $hl ); // https://bugzilla.wikimedia.org/show_bug.cgi?id=19253
Fixed. Bugzilla mangled the tab character, so I changed it to use "\t" instead.