Commit graph

11 commits

Author SHA1 Message Date
Ori Livneh e2ac12a7c4 Reintroduce 'emacs-lisp' as an alias for the Emacs Lisp lexer
'emacs-lisp' was an alias for the Emacs Lisp lexer.
It got dropped in Pygments commit 811926b, probably by accident.
So, declare it as a compatability alias until it is restored upstream.
Upstream bug: https://bitbucket.org/birkenfeld/pygments-main/issues/1207

Change-Id: I25c0e75a337c623529705c45bee0dc13dfdfd92c
2016-02-03 14:33:39 -08:00
Ori Livneh 5d99d54626 Update pygments bundle to 2.1
Changelog:
https://bitbucket.org/birkenfeld/pygments-main/raw/7614bf7/CHANGES

Lots of new lexers: Emacs Lisp, Arduino, Modula-2 with multi-dialect support,
Fortran fixed format, Archetype Definition language, Terraform, Jcl,
Easytrieve, ParaSail, Boogie, Turtle, Fish Shell, Roboconf, Test Anything
Protocol, Shen, Component Pascal, SuperCollider, Shell consoles (Tcsh,
PowerShell, MSDOS), Elm and J, Crmsh, Praat, CSound, Ezhil, Thrift, QVT
Operational, Hexdump, and CAmkES Configuration.

Bug: T125581
Change-Id: Ie881af3d1dff23f08ccc9cbcf5f94a084fa561e1
2016-02-02 15:17:25 -08:00
jenkins-bot d05162e653 Merge "Map 'gettext' to 'pot'" 2015-07-24 12:07:40 +00:00
John Vandenberg 3fdb883739 Map 'gettext' to 'pot'
Bug: T105889
Change-Id: I41a7441987bae95bfb7e138f06d9c27feef070b9
2015-07-18 17:09:08 +10:00
John Vandenberg 99b0cd96bd Render "dcl" as "sql"
"dcl" (Data Control Language) in GeSHi was SQL with
additional keyword support, and a fallback to pygments
'sql' renders correctly, albeit without all keywords
highlighted, however most of the keywords are part of 'sql'.

Change-Id: I121ce6d6ab20328dd1788f537127e16fa3049503
2015-07-16 08:48:21 +10:00
John Vandenberg 653292c2f2 Map other assembler language to 'asm' or 'nasm'
Add mappings for 6502acme, 6502tasm, 6502kickass,
68000devpac, dcpu16, m68k, mmix, mpasm, pic16, and z80.

Change-Id: If593f4ccbd158517824b6ceed43b7d6cf3b08080
2015-07-13 13:12:12 +10:00
John Vandenberg 124434abc8 Render "arm" as "asm"
"arm" in GeSHi was assembly with additional keyword support,
and a fallback to pygments 'asm' renders correctly.

Change-Id: I3eb354cda2a1f324dd539eb20e9801c8350e21d1
2015-07-12 19:20:06 +00:00
John Vandenberg aacd82820b Use 'ebnf' to render 'bnf'
bnf syntax renders correctly using the ebnf handler.

Change-Id: I4f6f96d1b1c034c1f653797d0d03436307ddc819
2015-07-12 21:36:30 +10:00
John Vandenberg 53ea68e8b3 Render "bibtex" as "latex"
bibtex was supported by GeSHi, and is LaTeX syntax.

Change-Id: Id29f61529c5afbc5c9ecf51f81b5cdae7f3b3737
2015-07-12 15:53:04 +10:00
Kunal Mehta 139f68c410 Render "xpp" as "java"
Per jayvdb on wikitech-l, who said it looks "quite good":
 https://lists.wikimedia.org/pipermail/wikitech-l/2015-June/082166.html

Change-Id: I234a4da51592cabddce356c692471e90e6f2a829
2015-06-23 11:29:08 -07:00
Ori Livneh 6484894497 Highlight using Pygments rather than Geshi
GeSHi is unmaintained, lacks support for many popular modern languages, and
suffers from deep architectural flaws, chief among them the inconsistent
tokenization of different languages, each of which requires a custom
stylesheet.

Pygments is a well-maintained alternative. It is, by my count, the most popular
syntax highlighting library around. It is BSD-licensed, actively maintained,
and is widely used in PHP projects.

To keep this easy to review, this change does not include update for l10n
files, and it does not delete the geshi/ directory. I will do those in a
separate patch.

The chief change between this and the previous implementation is that errors
result in the code block not being highlighted, as opposed to not being printed
at all, having been replaced by an angry red error message. I think that is the
right user experience. If you go to StackOverflow or GitHub and try to mark up
your code block as being written in some language that their highlighter
doesn't know about, you don't get an error message -- the code simply doesn't
get highlighted.

Because we don't recursively load dependencies for extensions, to test this,
you will need to create a composer.local.json in $IP and add:

    {
        "extra": {
            "merge-plugin": {
                "include": [
                    "extensions/SyntaxHighlight_GeSHi/composer.json"
                ]
            }
        }
    }

Then run `composer update`.

Bug: T85794
Change-Id: I07446ec9893fae3d1e394f435d3d95cf8be6bc33
2015-06-22 23:37:15 +01:00