Giter VIP home page Giter VIP logo

Comments (4)

ThomasWaldmann avatar ThomasWaldmann commented on June 2, 2024

Original comment by RogerHaase (Bitbucket: RogerHaase, GitHub: RogerHaase).


step 1 addressed by d8f3bd9 (bb)

            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

from moin.

ThomasWaldmann avatar ThomasWaldmann commented on June 2, 2024

Original comment by RogerHaase (Bitbucket: RogerHaase, GitHub: 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.

from moin.

ThomasWaldmann avatar ThomasWaldmann commented on June 2, 2024

Original comment by Aviral Dasgupta (Bitbucket: aviraldg, GitHub: aviraldg).


This is something we'd want to fix in Pygments itself, right? I've got basic moin and creole lexers done.

from moin.

ThomasWaldmann avatar ThomasWaldmann commented on June 2, 2024

Original comment by PRABHJYOT SODHI (Bitbucket: psdh, GitHub: psdh).


I would like to work on this :)

from moin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.