[Python-checkins] r66399 - doctools/trunk/sphinx/highlighting.py

georg.brandl python-checkins at python.org
Fri Sep 12 00:29:35 CEST 2008


Author: georg.brandl
Date: Fri Sep 12 00:29:35 2008
New Revision: 66399

Log:
Use a prefix to \at, \lb and \rb since they are probably often used command names.


Modified:
   doctools/trunk/sphinx/highlighting.py

Modified: doctools/trunk/sphinx/highlighting.py
==============================================================================
--- doctools/trunk/sphinx/highlighting.py	(original)
+++ doctools/trunk/sphinx/highlighting.py	Fri Sep 12 00:29:35 2008
@@ -61,15 +61,15 @@
         _lexer.add_filter('raiseonerror')
 
 
-escape_hl_chars = {ord(u'@'): u'@at[]',
-                   ord(u'['): u'@lb[]',
-                   ord(u']'): u'@rb[]'}
+escape_hl_chars = {ord(u'@'): u'@PYat[]',
+                   ord(u'['): u'@PYlb[]',
+                   ord(u']'): u'@PYrb[]'}
 
 # used if Pygments is not available
 _LATEX_STYLES = r'''
-\newcommand\at{@}
-\newcommand\lb{[}
-\newcommand\rb{]}
+\newcommand\PYat{@}
+\newcommand\PYlb{[}
+\newcommand\PYrb{]}
 '''
 
 


More information about the Python-checkins mailing list