From 8090e9040f9ed62ffb31614ed9df8010977c20a8 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 15 Mar 2020 18:33:41 +0900 Subject: Fix #7299: doc: Fix TODO tutorial --- doc/development/tutorials/examples/todo.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/development/tutorials/examples/todo.py') diff --git a/doc/development/tutorials/examples/todo.py b/doc/development/tutorials/examples/todo.py index 6ba39944f..7eee534d0 100644 --- a/doc/development/tutorials/examples/todo.py +++ b/doc/development/tutorials/examples/todo.py @@ -70,6 +70,9 @@ def process_todo_nodes(app, doctree, fromdocname): # Augment each todo with a backlink to the original location. env = app.builder.env + if not hasattr(env, 'todo_all_todos'): + env.todo_all_todos = [] + for node in doctree.traverse(todolist): if not app.config.todo_include_todos: node.replace_self([]) -- cgit v1.2.1