fix #4063: Sphinx crushes when there are referenced todolist

This commit is contained in:
Yoshiki Shibukawa
2017-10-12 23:16:50 +09:00
parent 4faa727368
commit cd1c7e01dc
2 changed files with 3 additions and 2 deletions

View File

@@ -28,6 +28,7 @@ Bugs fixed
* #4070, #4111: crashes when the warning message contains format strings (again)
* #4108: Search word highlighting breaks SVG images
* #3692: Unable to build HTML if writing .buildinfo failed
* #4063: Sphinx crashes when labelling directive '.. todolist::'
Testing
--------

View File

@@ -138,10 +138,10 @@ def process_todo_nodes(app, doctree, fromdocname):
for node in doctree.traverse(todolist):
if not app.config['todo_include_todos']:
node.replace_self([])
node.replace_self([nodes.target()])
continue
content = []
content = [nodes.target()]
for todo_info in env.todo_all_todos: # type: ignore
para = nodes.paragraph(classes=['todo-source'])