mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix: Citation target missing cause AssertionError. Closes #1160
This commit is contained in:
parent
fea8264aa5
commit
9d3bac3b8e
1
CHANGES
1
CHANGES
@ -9,6 +9,7 @@ Features added
|
|||||||
Bugs fixed
|
Bugs fixed
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
* #1160: Citation target missing cause AssertionError.
|
||||||
* #1157: Combination of 'globaltoc.html' and hidden toctree cause exception.
|
* #1157: Combination of 'globaltoc.html' and hidden toctree cause exception.
|
||||||
* Fix: 'make gettext' cause UnicodeDecodeError when templates contain utf-8
|
* Fix: 'make gettext' cause UnicodeDecodeError when templates contain utf-8
|
||||||
encoded string.
|
encoded string.
|
||||||
|
@ -1354,6 +1354,10 @@ class BuildEnvironment:
|
|||||||
if not isinstance(contnode, nodes.Element):
|
if not isinstance(contnode, nodes.Element):
|
||||||
del node['ids'][:]
|
del node['ids'][:]
|
||||||
raise
|
raise
|
||||||
|
elif 'ids' in node:
|
||||||
|
# remove ids attribute that annotated at
|
||||||
|
# transforms.CitationReference.apply.
|
||||||
|
del node['ids'][:]
|
||||||
# no new node found? try the missing-reference event
|
# no new node found? try the missing-reference event
|
||||||
if newnode is None:
|
if newnode is None:
|
||||||
newnode = builder.app.emit_firstresult(
|
newnode = builder.app.emit_firstresult(
|
||||||
|
@ -38,3 +38,9 @@ footenotes
|
|||||||
.. rubric:: Citations
|
.. rubric:: Citations
|
||||||
|
|
||||||
.. [bar] cite
|
.. [bar] cite
|
||||||
|
|
||||||
|
|
||||||
|
missing target
|
||||||
|
--------------------
|
||||||
|
[missing]_ citation
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ http://sphinx-doc.org/domains.html
|
|||||||
|
|
||||||
HTML_WARNINGS = ENV_WARNINGS + """\
|
HTML_WARNINGS = ENV_WARNINGS + """\
|
||||||
%(root)s/images.txt:20: WARNING: no matching candidate for image URI u'foo.\\*'
|
%(root)s/images.txt:20: WARNING: no matching candidate for image URI u'foo.\\*'
|
||||||
|
None:\\d+: WARNING: citation not found: missing
|
||||||
%(root)s/markup.txt:: WARNING: invalid single index entry u''
|
%(root)s/markup.txt:: WARNING: invalid single index entry u''
|
||||||
%(root)s/markup.txt:: WARNING: invalid pair index entry u''
|
%(root)s/markup.txt:: WARNING: invalid pair index entry u''
|
||||||
%(root)s/markup.txt:: WARNING: invalid pair index entry u'keyword; '
|
%(root)s/markup.txt:: WARNING: invalid pair index entry u'keyword; '
|
||||||
|
@ -28,6 +28,7 @@ def teardown_module():
|
|||||||
latex_warnfile = StringIO()
|
latex_warnfile = StringIO()
|
||||||
|
|
||||||
LATEX_WARNINGS = ENV_WARNINGS + """\
|
LATEX_WARNINGS = ENV_WARNINGS + """\
|
||||||
|
None:None: WARNING: citation not found: missing
|
||||||
None:None: WARNING: no matching candidate for image URI u'foo.\\*'
|
None:None: WARNING: no matching candidate for image URI u'foo.\\*'
|
||||||
WARNING: invalid pair index entry u''
|
WARNING: invalid pair index entry u''
|
||||||
WARNING: invalid pair index entry u'keyword; '
|
WARNING: invalid pair index entry u'keyword; '
|
||||||
|
@ -28,6 +28,7 @@ def teardown_module():
|
|||||||
texinfo_warnfile = StringIO()
|
texinfo_warnfile = StringIO()
|
||||||
|
|
||||||
TEXINFO_WARNINGS = ENV_WARNINGS + """\
|
TEXINFO_WARNINGS = ENV_WARNINGS + """\
|
||||||
|
None:None: WARNING: citation not found: missing
|
||||||
None:None: WARNING: no matching candidate for image URI u'foo.\\*'
|
None:None: WARNING: no matching candidate for image URI u'foo.\\*'
|
||||||
None:None: WARNING: no matching candidate for image URI u'svgimg.\\*'
|
None:None: WARNING: no matching candidate for image URI u'svgimg.\\*'
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user