supress empty span tag

This commit is contained in:
Yoshiki Shibukawa 2017-10-13 23:15:20 +09:00
parent cd1c7e01dc
commit 8769f388b1

View File

@ -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([nodes.target()])
continue
if node.get('ids'):
content = [nodes.target()]
else:
content = []
content = [nodes.target()]
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'])