Fix #2366: empty hyperref is generated on toctree in HTML builder

This commit is contained in:
Takeshi KOMIYA
2016-03-06 16:11:04 +09:00
parent 7c47e0665a
commit 92692a232f
2 changed files with 2 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ Bugs fixed
* #2358: Redece tocdepth if ``part`` or ``chapter`` is used for top_sectionlevel.
* #2351: Fix footnote spacing
* #2363: Fix ``toctree()`` in templates generates broken links in SingleHTMLBuilder.
* #2366: Fix empty hyperref is generated on toctree in HTML builder.
Release 1.3.6 (released Feb 29, 2016)

View File

@@ -203,7 +203,7 @@ class HTMLTranslator(BaseTranslator):
else:
atts['class'] += ' external'
if 'refuri' in node:
atts['href'] = node['refuri']
atts['href'] = node['refuri'] or '#'
if self.settings.cloak_email_addresses and \
atts['href'].startswith('mailto:'):
atts['href'] = self.cloak_mailto(atts['href'])