summaryrefslogtreecommitdiff
path: root/sphinx
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-01-09 00:47:48 +0100
committerGeorg Brandl <georg@python.org>2011-01-09 00:47:48 +0100
commitee17d27928890f20a3d2163156007fe77a7f9918 (patch)
tree334ef36d47c0173d6e7fb808313346f799888f7c /sphinx
parent8b63a39b1387bd27b9761f026f14b6f61c469c0b (diff)
parent9718becbe3025a32d5d82509118f15b77116f147 (diff)
downloadsphinx-ee17d27928890f20a3d2163156007fe77a7f9918.tar.gz
merge with 1.0
Diffstat (limited to 'sphinx')
-rw-r--r--sphinx/directives/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/directives/__init__.py b/sphinx/directives/__init__.py
index f11a4059..6e0300ab 100644
--- a/sphinx/directives/__init__.py
+++ b/sphinx/directives/__init__.py
@@ -33,7 +33,7 @@ except AttributeError:
# RE to strip backslash escapes
nl_escape_re = re.compile(r'\\\n')
-strip_backslash_re = re.compile(r'\\(?=[^\\])')
+strip_backslash_re = re.compile(r'\\(.)')
class ObjectDescription(Directive):
@@ -63,7 +63,7 @@ class ObjectDescription(Directive):
"""
lines = nl_escape_re.sub('', self.arguments[0]).split('\n')
# remove backslashes to support (dummy) escapes; helps Vim highlighting
- return [strip_backslash_re.sub('', line.strip()) for line in lines]
+ return [strip_backslash_re.sub(r'\1', line.strip()) for line in lines]
def handle_signature(self, sig, signode):
"""