diff options
| author | Georg Brandl <georg@python.org> | 2010-03-01 14:36:08 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-03-01 14:36:08 +0100 |
| commit | 63c040fcc26d9693a627e88d894562c26630ffa8 (patch) | |
| tree | 0ee773a794d0f1a72bd3536eece455389df61797 /sphinx/util | |
| parent | 21484180255bef33f7c3d15caa8592b8345087c4 (diff) | |
| download | sphinx-63c040fcc26d9693a627e88d894562c26630ffa8.tar.gz | |
Allow escaping "<" in x-ref roles by a backslash.
Diffstat (limited to 'sphinx/util')
| -rw-r--r-- | sphinx/util/nodes.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py index 13fa3c10..04185436 100644 --- a/sphinx/util/nodes.py +++ b/sphinx/util/nodes.py @@ -17,7 +17,8 @@ from docutils import nodes from sphinx import addnodes -explicit_title_re = re.compile('^(.+?)\s*<(.*?)>$', re.DOTALL) +# \x00 means the "<" was backslash-escaped +explicit_title_re = re.compile(r'^(.+?)\s*(?<!\x00)<(.*?)>$', re.DOTALL) caption_ref_re = explicit_title_re # b/w compat alias |
