#495: Fix internal vs. external link distinction for links coming from a docutils table-of-contents.

A node with a refid (i.e. '#anchor' target) can never be external.
This commit is contained in:
Georg Brandl committed 2010-08-23 16:04:28 +00:00
1 parent 6ef0e9ea67
commit e9c9fc9b7f
2 files changed
+4 -1

No files matched your search

+3
View File
@@ -1,6 +1,9 @@
Release 1.0.3 (in development)
==============================
* #495: Fix internal vs. external link distinction for links coming
from a docutils table-of-contents.
* #494: Fix the ``maxdepth`` option for the ``toctree()`` template
callable when used with ``collapse=True``.
+1 -1
View File
@@ -159,7 +159,7 @@ class HTMLTranslator(BaseTranslator):
# overwritten
def visit_reference(self, node):
atts = {'class': 'reference'}
if node.get('internal'):
if node.get('internal') or 'refuri' not in node:
atts['class'] += ' internal'
else:
atts['class'] += ' external'