Page MenuHomePhabricator

Syntaxhighlight no longer supports enclose="div" for line wrapping
Closed, ResolvedPublic

Description

Wrapping content within <syntaxhighlight lang="html5" enclose="div"> </syntaxhighlight> no longer recognizes the enclosure, the language and even inline css style settings.

First noticed this happening on Wikisource today (1.26wmf11 yesterday) & verified the same on testsite2.

Please verify by visiting:


Event Timeline

GOIII created this task.Jun 25 2015, 3:19 AM
GOIII raised the priority of this task from to Unbreak Now!.
GOIII updated the task description. (Show Details)
GOIII added a project: SyntaxHighlight.
GOIII added subscribers: GOIII, TheDJ.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 25 2015, 3:19 AM
GOIII set Security to None.Jun 25 2015, 3:30 AM
GOIII added subscribers: MZMcBride, ori, matmarex.
GOIII added a comment.Jun 25 2015, 3:33 AM
In T103585, @MZMcBride wrote:

http://en.wikipedia.beta.wmflabs.org/wiki/Python
enclose="div" should wrap long lines. This worked in the GeSHi-backed extension and seems to have broken with the switch to Pygments.

Krinkle claimed this task.Jun 25 2015, 3:41 AM
Krinkle renamed this task from Syntaxhighlight tags no longer recognizing inline settings to Syntaxhighlight no longer supports enclose="div" for line wrapping.Jun 25 2015, 3:45 AM
Krinkle added a project: Regression.

Change 220699 had a related patch set uploaded (by Ori.livneh):
Add white-space: pre-wrap to .mw-highlight

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

Change 220700 had a related patch set uploaded (by Krinkle):
Re-introduce support for enclose="div"

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

GOIII added a comment.EditedJun 25 2015, 4:38 AM

Change 220699 had a related patch set uploaded (by Ori.livneh):
Add white-space: pre-wrap to .mw-highlight
https://gerrit.wikimedia.org/r/220699

Err... I added that css locally and it did nothing. Shouldn't it be. . .

.mw-highlight .mw-code, .mw-highlight pre {
    white-space: pre-wrap;
}

... though that assumes enclose=div is the default state???

Change 220701 had a related patch set uploaded (by Krinkle):
Wrap lines in pre and .mw-code by default

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

Change 220702 had a related patch set uploaded (by Krinkle):
Remove obsolete mw-highlighter styles

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

GOIII added a comment.Jun 25 2015, 4:46 AM

Change 220702 had a related patch set uploaded (by Krinkle):
Remove obsolete mw-highlighter styles
https://gerrit.wikimedia.org/r/220702

there is also an unnecessary background-color setting in pygments.generated.css, Line 3, as well

Change 220699 abandoned by Krinkle:
Add white-space: pre-wrap to .mw-highlight

Reason:
Yep. Coordinated with Ori already. Superseded by Icd8b9bd56d6abc7b64c.

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

TheDJ added a comment.Jun 25 2015, 5:49 AM

ehm, wait, why did we just remove the force ltr ? We just added it to fix the blocks in rt. languages ....

Change 220702 merged by jenkins-bot:
Remove obsolete mw-highlighter styles

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

Change 220701 merged by jenkins-bot:
Wrap lines in <pre> and .mw-code by default

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

Change 220720 had a related patch set uploaded (by Ori.livneh):
Wrap lines in <pre> and .mw-code by default

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

Change 220720 merged by Ori.livneh:
Wrap lines in <pre> and .mw-code by default

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

ori added a comment.Jun 25 2015, 8:35 AM

ehm, wait, why did we just remove the force ltr ? We just added it to fix the blocks in rt. languages ....

Because it's done in core now: https://gerrit.wikimedia.org/r/#/c/220720/1/resources/src/mediawiki.skinning/elements.css

ori closed this task as Resolved.Jun 25 2015, 8:36 AM

Thanks Timo.

ehm, wait, why did we just remove the force ltr ? We just added it to fix the blocks in rt. languages ....

Because it's done in core now: https://gerrit.wikimedia.org/r/#/c/220720/1/resources/src/mediawiki.skinning/elements.css

Ehm, the pre wrap I can understand, but forcing the direction on all <pre> elements ?
Even starting a line with a ' ' in wikitext will then force you into ltr mode, that doesn't seem correct to me.

It is most definitely not correct.

matmarex reopened this task as Open.Jun 25 2015, 11:05 AM

Change 220738 had a related patch set uploaded (by Bartosz Dziewoński):
Revert "Remove obsolete mw-highlighter styles"

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

Change 220739 had a related patch set uploaded (by Bartosz Dziewoński):
Remove 'direction: ltr' from 'pre' styles

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

Change 220823 had a related patch set uploaded (by Ori.livneh):
Remove 'direction: ltr' from 'pre' styles

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

Change 220739 merged by jenkins-bot:
Remove 'direction: ltr' from 'pre' styles

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

Change 220823 merged by jenkins-bot:
Remove 'direction: ltr' from 'pre' styles

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

Change 220738 merged by jenkins-bot:
Revert "Remove obsolete mw-highlighter styles"

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

Krinkle closed this task as Resolved.Jun 25 2015, 6:07 PM

Summary for future readers, as the flurry of patches above is all but readable: this was resolved by making all HTML <pre/> tags render with line wrapping in MediaWiki core (something we wanted to do for a long time – T2260 – but couldn't due to conflicts between GeSHi and Tidy), removing the need for <syntaxhighlight enclose=div> support.