diff options
Diffstat (limited to 'doc/development/tutorials/examples/todo.py')
-rw-r--r-- | doc/development/tutorials/examples/todo.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/development/tutorials/examples/todo.py b/doc/development/tutorials/examples/todo.py index 7eee534d0..59e394ee8 100644 --- a/doc/development/tutorials/examples/todo.py +++ b/doc/development/tutorials/examples/todo.py @@ -61,6 +61,13 @@ def purge_todos(app, env, docname): if todo['docname'] != docname] +def merge_todos(app, env, docnames, other): + if not hasattr(env, 'todo_all_todos'): + env.todo_all_todos = [] + if hasattr(other, 'todo_all_todos'): + env.todo_all_todos.extend(other.todo_all_todos) + + def process_todo_nodes(app, doctree, fromdocname): if not app.config.todo_include_todos: for node in doctree.traverse(todo): @@ -119,6 +126,7 @@ def setup(app): app.add_directive('todolist', TodolistDirective) app.connect('doctree-resolved', process_todo_nodes) app.connect('env-purge-doc', purge_todos) + app.connect('env-merge-info', merge_todos) return { 'version': '0.1', |