Page MenuHomePhabricator

SyntaxHighlight should not convert tabs to 8 spaces
Closed, ResolvedPublic

Description

Now that bug 39616 is fixed, the SyntaxHighlight extension is converting every tab to a series of eight spaces. This transformation prevents the fix for bug 57824 from having any effect on <source> tags. It's also inconsistent with the CodeEditor extension, which displays tabs as four spaces and binds the Tab key to the tab character (bug 39616). While an eight-character wide tab may make sense in some contexts, replacing a tab with eight spaces would seem contrary to user intent in the vast majority of cases.

Possibly a regression of bug 30930?


Version: unspecified
Severity: normal
URL: https://www.mediawiki.org/wiki/User:Mxn/57826

Details

Reference
bz57826

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:36 AM
bzimport added a project: SyntaxHighlight.
bzimport set Reference to bz57826.
bzimport added a subscriber: Unknown Object (MLST).

Naturally, this bug breaks GeSHi's support for the Whitespace language, as seen in the URL above.

(In reply to comment #0)

Possibly a regression of bug 30930?

No, it's not. Bug 30930 was that Tidy's tabs-to-spaces change was making code be unaligned, and that was fixed by converting tabs-to-spaces before highlighting the code.

Change 98540 had a related patch set uploaded by Anomie:
Protect tabs from HTML Tidy

https://gerrit.wikimedia.org/r/98540

Change 98540 merged by jenkins-bot:
Protect tabs from HTML Tidy

https://gerrit.wikimedia.org/r/98540

Patch is merged, and should be deployed to WMF wikis with 1.23wmf6. See https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the schedule.