highlighter for moin wiki / creole wiki

Issue #16 open
Thomas Waldmann
repo owner created an issue

we need pretty highlighting (by pygments) for some more markups:




Compare that to how rst looks like:


Comments (6)

  1. RogerHaase

    {{{#!highlight moin and {{{#!highlight xml "work" for moin and docbook. But as noted above http://localhost:8080/+highlight/moin and ...+highlight/docbook and ...+highlight/creole default to the plain text lexer within pygments.

    The existing moin lexer is in <env>.../pygments/lexers/markup.py. The ReST and Markdown lexers are included in this same file. The MoinWikiLexer may have been created by the Trac Wiki folks, as its only mimetype is 'text/x-trac-wiki'.

    Nothing found for creole.

    Perhaps a 3 step process:

    1. As temporary workaround, add a bit of code to transform 'text/x.moin.wiki' to 'text/x-trac-wiki' and 'application/docbook+xml' to 'application/xml-dtd'. This can be done in moin only, no changes to pygments code.

    2. Update pygments markup.py. Perhaps split trac and moin into separate classes. Add a class for creole.

    3. Add a pygments lexer for 'application/docbook+xml' or add same as a mimetype to an existing lexer.

  2. RogerHaase

    step 1 addressed by d8f3bd9

                alias_mimetypes = {'text/x.moin.wiki': 'text/x-trac-wiki',
                                   'text/x.moin.creole': 'text/x-trac-wiki',
                                   'application/docbook+xml': 'application/xml'}
                mimetype = alias_mimetypes[mimetype] if mimetype in alias_mimetypes else mimetype
  3. Log in to comment