Page MenuHomePhabricator

Syntax highlighting has problems with "justify paragraphs" gadget
Closed, DeclinedPublic

Description

Syntax highlighting does not seem to work as intended when the user has turned on the justify paragraphs gadget in their settings. Reported by User:Rehman over here.

There seems to be a bug in this area. With the highlighter on, looking at the identical (duplicated) source codes [https://en.wikipedia.org/w/index.php?title=Template:Infobox_power_station/sandbox&action=edit&oldid=898711992 at enwiki] and [https://meta.wikimedia.org/w/index.php?title=User:Rehman/sandbox&action=edit&oldid=19118741 on meta], the enwiki text buckles when the highlighter is toggled on/off.
I did a bit of digging and noted that this happens when editors have "justify paragraphs" gadget on in preferences. This is a bug, because justification does not apply to edit mode when the syntax highlighter is off. But the text gets justified when highlighter is on. Ideally, the syntax highlighter should not enable text justification in edit mode, even if users has enabled "justify paragraphs" in preferences.