[Python-checkins] r57712 - doctools/trunk/sphinx/directives.py

georg.brandl python-checkins at python.org
Thu Aug 30 10:36:04 CEST 2007


Author: georg.brandl
Date: Thu Aug 30 10:36:04 2007
New Revision: 57712

Modified:
   doctools/trunk/sphinx/directives.py
Log:
Support backslash "escaping" in descitem signatures.


Modified: doctools/trunk/sphinx/directives.py
==============================================================================
--- doctools/trunk/sphinx/directives.py	(original)
+++ doctools/trunk/sphinx/directives.py	Thu Aug 30 10:36:04 2007
@@ -278,7 +278,8 @@
     node['desctype'] = desctype
 
     noindex = ('noindex' in options)
-    signatures = map(lambda s: s.strip(), arguments[0].split('\n'))
+    # remove backslashes to support (dummy) escapes; helps Vim's highlighting
+    signatures = map(lambda s: s.strip().replace('\\', ''), arguments[0].split('\n'))
     names = []
     clsname = None
     for i, sig in enumerate(signatures):


More information about the Python-checkins mailing list