mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #4144 from sphinx-doc/fix/referenced_todo
fix #4063: Sphinx crushes when there are referenced todolist
This commit is contained in:
commit
b2871605cc
1
CHANGES
1
CHANGES
@ -30,6 +30,7 @@ Bugs fixed
|
||||
* #4108: Search word highlighting breaks SVG images
|
||||
* #3692: Unable to build HTML if writing .buildinfo failed
|
||||
* #4152: HTML writer crashes if a field list is placed on top of the document
|
||||
* #4063: Sphinx crashes when labelling directive '.. todolist::'
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -137,11 +137,14 @@ def process_todo_nodes(app, doctree, fromdocname):
|
||||
env.todo_all_todos = [] # type: ignore
|
||||
|
||||
for node in doctree.traverse(todolist):
|
||||
if not app.config['todo_include_todos']:
|
||||
node.replace_self([])
|
||||
continue
|
||||
if node.get('ids'):
|
||||
content = [nodes.target()]
|
||||
else:
|
||||
content = []
|
||||
|
||||
content = []
|
||||
if not app.config['todo_include_todos']:
|
||||
node.replace_self(content)
|
||||
continue
|
||||
|
||||
for todo_info in env.todo_all_todos: # type: ignore
|
||||
para = nodes.paragraph(classes=['todo-source'])
|
||||
|
Loading…
Reference in New Issue
Block a user