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 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.
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 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

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

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

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

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, 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.

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

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.