mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
merge with 0.5
This commit is contained in:
@@ -634,7 +634,6 @@ class BuildEnvironment:
|
||||
deps = doctree.settings.record_dependencies
|
||||
if not deps:
|
||||
return
|
||||
docdir = path.dirname(self.doc2path(docname, base=None))
|
||||
for dep in deps.list:
|
||||
# the dependency path is relative to the working dir, so get
|
||||
# one relative to the srcdir
|
||||
|
||||
@@ -39,11 +39,10 @@ def os_path(canonicalpath):
|
||||
|
||||
def relative_uri(base, to):
|
||||
"""Return a relative URL from ``base`` to ``to``."""
|
||||
if to.startswith(SEP):
|
||||
return to
|
||||
b2 = base.split(SEP)
|
||||
t2 = to.split(SEP)
|
||||
if len(t2) > 1 and t2[0] == '':
|
||||
# "to" is absolute, return it
|
||||
return to
|
||||
# remove common segments
|
||||
for x, y in zip(b2, t2):
|
||||
if x != y:
|
||||
|
||||
Reference in New Issue
Block a user