mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2247: #2205 breaks make html for definition list with classifiers that contains regular-expression like string
This commit is contained in:
parent
8167a9b7ad
commit
34cbf3bad7
2
CHANGES
2
CHANGES
@ -10,6 +10,8 @@ Bugs fixed
|
||||
* Fix line numbers was not shown on warnings of indecies
|
||||
* #2026: Fix LaTeX builder rais error if parsed-literal includes links
|
||||
* #2243: Ignore strange docstring types for classes, do not crash
|
||||
* #2247: Fix #2205 breaks make html for definition list with classifiers
|
||||
that contains regular-expression like string
|
||||
|
||||
Release 1.3.4 (released Jan 12, 2016)
|
||||
=====================================
|
||||
|
@ -50,7 +50,7 @@ def apply_source_workaround(node):
|
||||
# strip classifier from rawsource of term
|
||||
for classifier in reversed(node.parent.traverse(nodes.classifier)):
|
||||
node.rawsource = re.sub(
|
||||
'\s*:\s*%s' % classifier.astext(), '', node.rawsource)
|
||||
'\s*:\s*%s' % re.escape(classifier.astext()), '', node.rawsource)
|
||||
|
||||
# workaround: recommonmark-0.2.0 doesn't set rawsource attribute
|
||||
if not node.rawsource:
|
||||
|
@ -40,3 +40,8 @@ msgstr "CLASSIFIER1"
|
||||
msgid "classifier2"
|
||||
msgstr "CLASSIFIER2"
|
||||
|
||||
msgid "Some term with"
|
||||
msgstr "SOME TERM WITH"
|
||||
|
||||
msgid "classifier[]"
|
||||
msgstr "CLASSIFIER[]"
|
||||
|
@ -12,3 +12,5 @@ Some *term* `with link <http://sphinx-doc.org/>`__
|
||||
Some **term** with : classifier1 : classifier2
|
||||
The corresponding definition
|
||||
|
||||
Some term with : classifier[]
|
||||
The corresponding definition
|
||||
|
@ -192,6 +192,8 @@ def test_text_builder(app, status, warning):
|
||||
u"\n THE CORRESPONDING DEFINITION #2\n"
|
||||
u"\nSOME **TERM** WITH : CLASSIFIER1 : CLASSIFIER2"
|
||||
u"\n THE CORRESPONDING DEFINITION\n"
|
||||
u"\nSOME TERM WITH : CLASSIFIER[]"
|
||||
u"\n THE CORRESPONDING DEFINITION\n"
|
||||
)
|
||||
yield assert_equal, result, expect
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user