Page MenuHomePhabricator

Add "wikitext" as language in Pygments
Open, LowestPublic

Assigned To
Authored By
Mar 2 2011, 8:32 PM
Referenced Files
F7693: mediawiki.php
Nov 21 2014, 11:31 PM
"Love" token, awarded by Quiddity."Love" token, awarded by Iniquity."Like" token, awarded by Naseweis520."Like" token, awarded by Ailbeve."Like" token, awarded by SerDIDG."Like" token, awarded by Kghbln."Like" token, awarded by IKhitron."Like" token, awarded by Miguu."Like" token, awarded by He7d3r."Like" token, awarded by Fae.


Add "wikitext" as a language lexer in Pygments, as used in Extension:SyntaxHighlight

See attachment below for (incomplete) lang='mediawiki" patch.

Upstream Pygments feature request:

Older notes at the GeSHi feature requests: ("wikitext") and (MediaWiki). (but nothing in GeSHi's newer GitHub issues).

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
bzimport raised the priority of this task from to Lowest.Nov 21 2014, 11:31 PM
bzimport set Reference to bz27828.

As an aside, this is somewhat of an upstream issue, since we just make the bridge that connects GESHI (the syntax highlighter) to mediawiki, we don't actually make the part that does the syntax highlighting. (With that said, if anyone's going to do this, it'd probably be us since we're the only one's who'd need a wikitext syntax highlighter)

intnumerix wrote:

Mediawiki syntax file (draft)

A small test for a mediawiki syntax file.
Some colors are ugly...


intnumerix wrote:

I made a small test (see attachment). It is quite difficult to integrate html tags in mediawiki syntax ... geshi script delimiters cannot work here.

Yeah, there's no way for us to put it in..

If you're wanting to do this, the authors are quite accomodating

You will need to get it fully complete I imagine...

But easier to drop a request on their bugtracker. Then when it's added, and in a tagged release, we can update the version this extension references :)

[Removing RESOLVED LATER as discussed in . Reopening and setting priority to "Lowest". For future reference, please use either RESOLVED WONTFIX (for issues that will not be fixed), or simply set lowest priority. Thanks a lot!]

Spage added a project: Patch-For-Review.
Spage set Security to None.

Change 213964 had a related patch set uploaded (by Spage):
[WIP] Add lang="mediawiki" syntax highlighting

Change 213964 abandoned by Jforrester:
[WIP] Add lang="mediawiki" syntax highlighting

This now needs to be made upstream in Pygments.

This comment was removed by Spage.
Fae added a subscriber: Fae.
Quiddity renamed this task from Add "wikitext" as language to Add "wikitext" as language in Pygments.Oct 19 2018, 4:35 PM
Quiddity updated the task description. (Show Details)
Quiddity removed a subscriber: Spage.
Quiddity added subscribers: Seb35, Quiddity.

@Seb35 thank you for your note on the upstream issue. Is there anything specific you need help on, to move this forward?

What was blocking this? Was there an upstream issue?

@ShakespeareFan00 Please read the task description first which does include an upstream issue link. Thanks.

Has this really been stalled with an upstream provider for 10 years? Can we just fork this?

Has this really been stalled with an upstream provider for 10 years? Can we just fork this?

I don't think a fork is necessary or helps us. Also this task was previously against GeSHi.

Someone needs to write the file and submit it upstream (pygments) for review, inclusion etc. AFAIK no one has attempted that just yet.

The upstream task at has only existed since August 2019.

Thanks, must have misread the notes above, thought the patch was already submitted to them.

Diskdance added a subscriber: Diskdance.

I have been working on this for quite a while. Now I am going though a bunch of tests, hopefully a PR would be filed soon.