Commits

Georg Brandl  committed 3dbeb52

#328: avoid "here" links in todolist.

  • Participants
  • Parent commits 1814dd5

Comments (0)

Files changed (1)

File sphinx/ext/todo.py

         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(
                 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']