diff options
author | Julien Palard <julien@palard.fr> | 2020-07-06 17:55:03 +0200 |
---|---|---|
committer | Julien Palard <julien@palard.fr> | 2020-07-06 17:55:55 +0200 |
commit | 418576ddd1370f708a866e890935341d849be700 (patch) | |
tree | 140274d01d316259ca48fbe487edd4f3e8a03f64 /doc/development/tutorials/examples/todo.py | |
parent | 44ee514fbe380fb3b9a44c3c64a1106dbc644b71 (diff) | |
download | sphinx-git-418576ddd1370f708a866e890935341d849be700.tar.gz |
Doc: Add missing 'env-merge-info' to the todo tutorial.
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', |