Page MenuHomePhabricator

Flow: syntax highlighting tags (GeSHi) don't get styled
Open, MediumPublic

Description

Syntax highlighting doesn't work with Flow.

Example input:

<syntaxhighlight lang="css">
.foo {
    font-weight: bold;
}
</syntaxhighlight>

Output is not appropriately highlighted: https://www.mediawiki.org/wiki/Topic:Sb29d13fybslwgjh
It should look like this: https://www.mediawiki.org/w/index.php?title=User:Quiddity_%28WMF%29/sandbox&oldid=1397603


TheDJ notes (in comment below) that this might be related (plus its blockers): T69540: Produce/preserve the metadata about additional ResourceLoader modules required by extension tags

Details

Reference
bz57159

Event Timeline

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

The WMF core features team tracks this bug on Mingle card https://mingle.corp.wikimedia.org/projects/flow/cards/475, but people from the community are welcome to contribute here and in Gerrit.

TheDJ notes, "ah, I see that Resourceloader modules don't work yet :)".[1]

So perhaps this bug should be expanded to cover that?
I'll leave that up to the devs.

[1] at https://www.mediawiki.org/w/index.php?title=Talk:Flow&workflow=rxtlvx7tsc2qqf1b#flow-post-ry5zwru18qpuglqk

Flow needs 2 things here. When rendering the original page, it needs to pick up the resources and add them into the parser output, so they end up on the head. Additionally, they need to be transferred in api results, preferably similar to how action=parse does it for prop=modules.

This is probably closely related to bug 67540:

And specifically you might want to look at one of it's blockers:
Bug 51245, bug 58388 and bug 67515 which detail similar problems for VE..

He7d3r removed a project: SyntaxHighlight.
He7d3r set Security to None.
He7d3r removed a subscriber: Mattflaschen-WMF.
Mattflaschen-WMF renamed this task from Flow: syntax highlighting doesn't work to Flow: syntax highlighting tags (GeSHi) don't work.Feb 5 2015, 7:36 PM
Mattflaschen-WMF updated the task description. (Show Details)
Mattflaschen-WMF renamed this task from Flow: syntax highlighting tags (GeSHi) don't work to Flow: syntax highlighting tags (GeSHi) don't get styled.May 19 2016, 6:51 PM

I'm having the same problem.

All codes is not styled.

In the log, nothing is printed.

Any help?

Volker_E rescinded a token.
Volker_E removed a subscriber: wikibugs-l-list.
Volker_E subscribed.

@aka_sektor: The status of this task is "open", see the upper corner. Hence this issue is not fixed and we all know that. :) No need to comment and tell. If you would like to contribute a code change to fix this problem, you are very welcome to use developer access to submit the proposed code changes as a Git branch directly into Gerrit.

@Aklapper : Just let them return it as it was in 1.28.2
I do not know what exactly they broke.

@Aklapper : Just let them return it as it was in 1.28.2
I do not know what exactly they broke.

I only know that this problem affects board too: https://www.mediawiki.org/w/index.php?title=Flow/Sandbox&header_revId=twwnd0zvz6kx6bhb&action=view-header

Ok. I make rollback to 1.28.2
No one fixes the bug.

Note: the ResourceLoader module missing is ext.pygments. You can load it unconditionally using mw.loader.load( 'ext.pygments' ), and I guess you could add this to your common.js to work around this bug if it’s very important :)

As a recent example, this can be seen at https://www.mediawiki.org/wiki/Topic:W5dh34nv202fzq7f.

Other examples of likely affected features include Cite <ref>, Math, WikiHiero, TemplateData docs, TimedMediaHandler video player, 3D graphics, and more (Codesearch)

This issue also affects the highlight= attribute, by the way – marked lines aren’t distinguished either.