Hi please add Less to SyntaxHighlight_GeSHi.lexers.php. See for example https://www.mediawiki.org/wiki/Manual:Coding_conventions/CSS#LESS where CSS is currently set due to missing support.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Map 'less' to 'css' | mediawiki/extensions/SyntaxHighlight_GeSHi | master | +3 -0 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | None | T105788 Add Less to list of SyntaxHighlight_GeSHi.lexers.php | |||
Resolved | ori | T125581 Update Pygments to latest 2.1 |
Event Timeline
Related upstream:
https://bitbucket.org/birkenfeld/pygments-main/issues/780/add-a-less-lexer
https://bitbucket.org/birkenfeld/pygments-main/pull-request/475/ability-to-handle-less-files/diff
I guess we can just add the alias in the syntax highlight extension.
Seems reasonable. We will need to review the aliases each time a new Pygments version is released.
Change 258694 had a related patch set uploaded (by John Vandenberg):
Map 'less' to 'css'
Change 258694 abandoned by TheDJ:
Map 'less' to 'css'
Reason:
Now done in core pygments.
@TheDJ Where do you find the wished outcome in upstream? Links from above both are still showing "open".
Actually, I should be a bit more nuanced. Less is now an alias for css in upstream. The merged patch was not rolled back, even though this was implied in a comment of the pull request. It's not really ideal however.
There is a demo here: http://pygments.org/demo/3762938/
@TheDJ Besides smaller glitches, like inappropriate border-radius or ignoring inline comments, that's a big step forward. Good to see that happen!
We might want to fork this ticket for full support of less, as described in the ticket https://bitbucket.org/birkenfeld/pygments-main/issues/780/add-a-less-lexer ?
I actually made a demo as well, forgot to past the link before: http://pygments.org/demo/3763103/