#31 adding pygments options to code directive

open
nobody
None
5
2013-10-04
2012-10-17
Anonymous
No

some pygments lexers support options (notably the pycon lexer supports a python3 flag that enables python3 support).
the attached patch propose to support passing options to pygments using this syntax:

.. code:: pycon
:pygments-options: python3

>>> print("coucou")
coucou

remark:
the attached patch supports a list of key[=value] as pygments-options content, but values can not be lists, which would be needed to support all pygments lexer options.

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-10-17

    prototype implementation

     
    Last edit: Anonymous 2014-07-29
  • Günter Milde

    Günter Milde - 2013-08-21

    How about separating the pygments-options by newlines in the input to
    allow list arguments?

    .. code:: lua
       :pygments-options: disabled_modules = foo, bar
                          ensurenl = True
    
     
  • Dmitry Shachnev

    Dmitry Shachnev - 2013-10-04

    I have now attached an updated patch version in patches/112.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks