Re: some single quotes in code blocks, wrapped as error in html ouput

Guenter Milde <[email protected]>
Newsgroups gmane.text.docutils.user
Message-ID <[email protected]>
On 2016-01-01, Jeff Hinrichs - DM&T wrote:

> Subject: some single quotes in code blocks, wrapped as error in html ouput

They are actually *highlighted* as "error" by pygments.

The reason seems to be, that you set the language to "python" but the code
block contains an interactive Python session or a doctest.
Pygments uses the language name "pycon" in this case:

.. code:: pycon

    >>> 'a' < 'b'
    True
    >>> type(5)
    <class 'int'>
    >>> type(5.0)
    <class 'float'>

> HTML: (rst2html)

works for me here.

> Escaping in a code block does not work,

Yes. Escaping only works in "parsed literal", but then you don't have syntax
highlight.


Günter


------------------------------------------------------------------------------
_______________________________________________
Docutils-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.