Fix #7299: doc: Fix TODO tutorial

This commit is contained in:
Takeshi KOMIYA 2020-03-15 18:33:41 +09:00
parent 8f45bee2a1
commit 8090e9040f

View File

@ -70,6 +70,9 @@ def process_todo_nodes(app, doctree, fromdocname):
# Augment each todo with a backlink to the original location. # Augment each todo with a backlink to the original location.
env = app.builder.env env = app.builder.env
if not hasattr(env, 'todo_all_todos'):
env.todo_all_todos = []
for node in doctree.traverse(todolist): for node in doctree.traverse(todolist):
if not app.config.todo_include_todos: if not app.config.todo_include_todos:
node.replace_self([]) node.replace_self([])