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
|
||||
----------
|
||||
|
||||
* #1160: Citation target missing cause AssertionError.
|
||||
* #1157: Combination of 'globaltoc.html' and hidden toctree cause exception.
|
||||
* Fix: 'make gettext' cause UnicodeDecodeError when templates contain utf-8
|
||||
encoded string.
|
||||
|
@ -1354,6 +1354,10 @@ class BuildEnvironment:
|
||||
if not isinstance(contnode, nodes.Element):
|
||||
del node['ids'][:]
|
||||
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
|
||||
if newnode is None:
|
||||
newnode = builder.app.emit_firstresult(
|
||||
|
@ -38,3 +38,9 @@ footenotes
|
||||
.. rubric:: Citations
|
||||
|
||||
.. [bar] cite
|
||||
|
||||
|
||||
missing target
|
||||
--------------------
|
||||
[missing]_ citation
|
||||
|
||||
|
@ -49,6 +49,7 @@ http://sphinx-doc.org/domains.html
|
||||
|
||||
HTML_WARNINGS = ENV_WARNINGS + """\
|
||||
%(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 pair index entry u''
|
||||
%(root)s/markup.txt:: WARNING: invalid pair index entry u'keyword; '
|
||||
|
@ -28,6 +28,7 @@ def teardown_module():
|
||||
latex_warnfile = StringIO()
|
||||
|
||||
LATEX_WARNINGS = ENV_WARNINGS + """\
|
||||
None:None: WARNING: citation not found: missing
|
||||
None:None: WARNING: no matching candidate for image URI u'foo.\\*'
|
||||
WARNING: invalid pair index entry u''
|
||||
WARNING: invalid pair index entry u'keyword; '
|
||||
|
@ -28,6 +28,7 @@ def teardown_module():
|
||||
texinfo_warnfile = StringIO()
|
||||
|
||||
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'svgimg.\\*'
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user