Re: exclamation mark in code block generates error tag around !

Marc 'BlackJack' Rintsch <[email protected]>
Newsgroups gmane.text.docutils.user
Message-ID <[email protected]>
On 01/01/16 15:57, Jeff Hinrichs - DM&T wrote:
> rST:
> 
> .. code:: python                                                        
>                                                                            
> 
>     >>> print('Hello World!')                                          
>                                                                             
>     Hello World!                                                        
>                                                                            
>     >>> 

The problem here is that you are trying to highlight code as Python
source code which is a console session and not just Python source code.

Pygments has a separate lexer for console sessions called `pycon`.  Try
that one instead of `python`.

Ciao,
	Marc 'BlackJack' Rintsch
-- 
„A life is like a garden. Perfect moments can be had, but not preserved,
 except in memory. LLAP” — Leonard Nimoy's last tweet.

------------------------------------------------------------------------------
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iEYEARECAAYFAlaGphYACgkQA1KPOgQjxlUf5gCgu/aytqbOpJ6jFv/8APL/GkIL
vcAAniNMo4bKkLdMHrhIJT724l0yNMIU
=oLdA
-----END PGP SIGNATURE-----
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.