fix #4214: Two todolist directives break sphinx-1.6.5

This commit is contained in:
Matthew Fernandez 2017-11-05 14:01:55 -08:00
parent 9158a5be1b
commit fd94702eed
2 changed files with 3 additions and 1 deletions

View File

@ -23,6 +23,7 @@ Bugs fixed
* #4221: napoleon depends on autodoc, but users need to load it manually
* #2298: automodule fails to document a class attribute
* #4099: C++: properly link class reference to class from inside constructor
* #4214: Two todolist directives break sphinx-1.6.5
Testing
--------

View File

@ -178,7 +178,8 @@ def process_todo_nodes(app, doctree, fromdocname):
todo_entry = todo_info['todo']
# Remove targetref from the (copied) node to avoid emitting a
# duplicate label of the original entry when we walk this node.
del todo_entry['targetref']
if 'targetref' in todo_entry:
del todo_entry['targetref']
# (Recursively) resolve references in the todo content
env.resolve_references(todo_entry, todo_info['docname'],