diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-12-31 21:05:38 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-31 21:05:38 +0900 |
commit | fce7f38b7170549400eada8f7afd8ae5e443348e (patch) | |
tree | 5e7b9714b84288b1ca04438b73611a78aa4c23df /sphinx/ext/todo.py | |
parent | 0059c05a857f4144e4eea8b3d2908e906cf7de49 (diff) | |
parent | 1cae50f74833fc3506ebee19462e0a1457638352 (diff) | |
download | sphinx-git-fce7f38b7170549400eada8f7afd8ae5e443348e.tar.gz |
Merge pull request #4217 from Smattr/4a164170-33e9-4df3-aad2-a13af37b6b43
Fix #4214: Two todolist directives break sphinx-1.6.5
Diffstat (limited to 'sphinx/ext/todo.py')
-rw-r--r-- | sphinx/ext/todo.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/ext/todo.py b/sphinx/ext/todo.py index a58422793..badfbc35f 100644 --- a/sphinx/ext/todo.py +++ b/sphinx/ext/todo.py @@ -178,7 +178,8 @@ def process_todo_nodes(app, doctree, fromdocname): todo_entry = todo_info['todo'] # Remove targetref from the (copied) node to avoid emitting a # duplicate label of the original entry when we walk this node. - del todo_entry['targetref'] + if 'targetref' in todo_entry: + del todo_entry['targetref'] # (Recursively) resolve references in the todo content env.resolve_references(todo_entry, todo_info['docname'], |