From 2af4986e787e7ab130a7b7f17dac006c11e2c448 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 2 Jan 2010 00:30:42 +0100 Subject: [PATCH] IE apparently does not like href=""; change this to href="#" which appears to work. --- sphinx/builders/html.py | 3 ++- sphinx/environment.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py index e2eda3fc0..0f70932a3 100644 --- a/sphinx/builders/html.py +++ b/sphinx/builders/html.py @@ -641,7 +641,8 @@ class StandaloneHTMLBuilder(Builder): baseuri=self.get_target_uri(pagename)): if not resource: otheruri = self.get_target_uri(otheruri) - return relative_uri(baseuri, otheruri) + uri = relative_uri(baseuri, otheruri) or '#' + return uri ctx['pathto'] = pathto ctx['hasdoc'] = lambda name: name in self.env.all_docs ctx['customsidebar'] = self.config.html_sidebars.get(pagename) diff --git a/sphinx/environment.py b/sphinx/environment.py index 95595dd56..83c97d5f4 100644 --- a/sphinx/environment.py +++ b/sphinx/environment.py @@ -930,7 +930,7 @@ class BuildEnvironment: """Return a TOC nodetree -- for use on the same page only!""" toc = self.tocs[docname].deepcopy() for node in toc.traverse(nodes.reference): - node['refuri'] = node['anchorname'] + node['refuri'] = node['anchorname'] or '#' return toc def get_toctree_for(self, docname, builder, collapse):