mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
supress empty span tag
This commit is contained in:
parent
cd1c7e01dc
commit
8769f388b1
@ -137,11 +137,14 @@ def process_todo_nodes(app, doctree, fromdocname):
|
|||||||
env.todo_all_todos = [] # type: ignore
|
env.todo_all_todos = [] # type: ignore
|
||||||
|
|
||||||
for node in doctree.traverse(todolist):
|
for node in doctree.traverse(todolist):
|
||||||
if not app.config['todo_include_todos']:
|
if node.get('ids'):
|
||||||
node.replace_self([nodes.target()])
|
|
||||||
continue
|
|
||||||
|
|
||||||
content = [nodes.target()]
|
content = [nodes.target()]
|
||||||
|
else:
|
||||||
|
content = []
|
||||||
|
|
||||||
|
if not app.config['todo_include_todos']:
|
||||||
|
node.replace_self(content)
|
||||||
|
continue
|
||||||
|
|
||||||
for todo_info in env.todo_all_todos: # type: ignore
|
for todo_info in env.todo_all_todos: # type: ignore
|
||||||
para = nodes.paragraph(classes=['todo-source'])
|
para = nodes.paragraph(classes=['todo-source'])
|
||||||
|
Loading…
Reference in New Issue
Block a user