mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fixes #892: Fix single-HTML builder misbehaving with the master document in a subdirectory.
This commit is contained in:
parent
b21f7931fa
commit
17591ffe93
3
CHANGES
3
CHANGES
@ -48,6 +48,9 @@ Release 1.1.3 (in development)
|
||||
|
||||
* #870: Fix spurious KeyErrors when removing documents.
|
||||
|
||||
* #892: Fix single-HTML builder misbehaving with the master document in a
|
||||
subdirectory.
|
||||
|
||||
|
||||
Release 1.1.2 (Nov 1, 2011) -- 1.1.1 is a silly version number anyway!
|
||||
======================================================================
|
||||
|
@ -698,9 +698,12 @@ class StandaloneHTMLBuilder(Builder):
|
||||
ctx = self.globalcontext.copy()
|
||||
# current_page_name is backwards compatibility
|
||||
ctx['pagename'] = ctx['current_page_name'] = pagename
|
||||
default_baseuri = self.get_target_uri(pagename)
|
||||
# in the singlehtml builder, default_baseuri still contains an #anchor
|
||||
# part, which relative_uri doesn't really like...
|
||||
default_baseuri = default_baseuri.rsplit('#', 1)[0]
|
||||
|
||||
def pathto(otheruri, resource=False,
|
||||
baseuri=self.get_target_uri(pagename)):
|
||||
def pathto(otheruri, resource=False, baseuri=default_baseuri):
|
||||
if resource and '://' in otheruri:
|
||||
# allow non-local resources given by scheme
|
||||
return otheruri
|
||||
|
Loading…
Reference in New Issue
Block a user