https://bugzilla.wikimedia.org/show_bug.cgi?id=36576
Web browser: ---
Bug #: 36576
Summary: Update Wikimedia's NOC's highlight.php to not convert
tab characters into spaces
Product: Wikimedia
Version: unspecified
Platform: All
URL: http://noc.wikimedia.org/conf/highlight.php?file=Commo
nSettings.php
OS/Version: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: General/Unknown
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Mobile Platform: ---
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
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l