diff options
author | cocodrips <cocodrips@gmail.com> | 2018-12-26 11:31:44 +0900 |
---|---|---|
committer | cocodrips <cocodrips@gmail.com> | 2018-12-26 11:31:50 +0900 |
commit | 827059be93426b83afd2fc7d823c48681e5f913a (patch) | |
tree | ec1893e5cf77acbb79d736ea3f841dc864781740 /sphinx/ext/todo.py | |
parent | 448181d9f97611d352c0c8ec21e55e8242db9d60 (diff) | |
parent | 99a7dca2160996e3189dfcc2176bbbbac531d5f3 (diff) | |
download | sphinx-git-827059be93426b83afd2fc7d823c48681e5f913a.tar.gz |
Merge remote-tracking branch 'upstream/master' into 5842-apidoc-extensions
Diffstat (limited to 'sphinx/ext/todo.py')
-rw-r--r-- | sphinx/ext/todo.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sphinx/ext/todo.py b/sphinx/ext/todo.py index 62fea7df8..1d8f9cb60 100644 --- a/sphinx/ext/todo.py +++ b/sphinx/ext/todo.py @@ -173,7 +173,10 @@ def process_todo_nodes(app, doctree, fromdocname): try: newnode['refuri'] = app.builder.get_relative_uri( fromdocname, todo_info['docname']) - newnode['refuri'] += '#' + todo_info['target']['refid'] + if 'refid' in todo_info['target']: + newnode['refuri'] += '#' + todo_info['target']['refid'] + else: + newnode['refuri'] += '#' + todo_info['target']['ids'][0] except NoUri: # ignore if no URI can be determined, e.g. for LaTeX output pass |