diff options
| author | Georg Brandl <georg@python.org> | 2010-01-31 16:37:54 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-01-31 16:37:54 +0100 |
| commit | 980852c0dd9e13e65c77dd4e67d907de2c4ff5a2 (patch) | |
| tree | b59d3fbc1c3e90bd219c2d34f9b5258b57456c5a /sphinx/ext/todo.py | |
| parent | d7f34b089b5a52fa33fb945f2f02cdf34d4a788f (diff) | |
| download | sphinx-980852c0dd9e13e65c77dd4e67d907de2c4ff5a2.tar.gz | |
#328: avoid "here" links in todolist.
Diffstat (limited to 'sphinx/ext/todo.py')
| -rw-r--r-- | sphinx/ext/todo.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sphinx/ext/todo.py b/sphinx/ext/todo.py index 43e8eaa7..33ae8901 100644 --- a/sphinx/ext/todo.py +++ b/sphinx/ext/todo.py @@ -107,14 +107,15 @@ def process_todo_nodes(app, doctree, fromdocname): for todo_info in env.todo_all_todos: para = nodes.paragraph(classes=['todo-source']) filename = env.doc2path(todo_info['docname'], base=None) - description = ( - _('(The original entry is located in %s, line %d and ' - 'can be found ') % (filename, todo_info['lineno'])) - para += nodes.Text(description, description) + description = _('(The <<original entry>> is located in ' + ' %s, line %d.)') % (filename, todo_info['lineno']) + desc1 = description[:description.find('<<')] + desc2 = description[description.find('>>')+2:] + para += nodes.Text(desc1, desc1) # Create a reference newnode = nodes.reference('', '') - innernode = nodes.emphasis(_('here'), _('here')) + innernode = nodes.emphasis(_('original entry'), _('original entry')) newnode['refdocname'] = todo_info['docname'] try: newnode['refuri'] = app.builder.get_relative_uri( @@ -125,7 +126,7 @@ def process_todo_nodes(app, doctree, fromdocname): pass newnode.append(innernode) para += newnode - para += nodes.Text('.)', '.)') + para += nodes.Text(desc2, desc2) # (Recursively) resolve references in the todo content todo_entry = todo_info['todo'] |
