mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #7339 from tk0miya/3842_broken_images_when_singlehtml
Fix #3842: singlehtml: Path to images broken when master doc is not in source root
This commit is contained in:
commit
046b55b43d
1
CHANGES
1
CHANGES
@ -127,6 +127,7 @@ Bugs fixed
|
||||
* #7278: html search: Fix use of ``html_file_suffix`` instead of
|
||||
``html_link_suffix`` in search results
|
||||
* #7297: html theme: ``bizstyle`` does not support ``sidebarwidth``
|
||||
* #3842: singlehtml: Path to images broken when master doc is not in source root
|
||||
* #7179: std domain: Fix whitespaces are suppressed on referring GenericObject
|
||||
* #7289: console: use bright colors instead of bold
|
||||
* #1539: C, parse array types.
|
||||
|
@ -59,8 +59,8 @@ def relative_uri(base: str, to: str) -> str:
|
||||
"""Return a relative URL from ``base`` to ``to``."""
|
||||
if to.startswith(SEP):
|
||||
return to
|
||||
b2 = base.split(SEP)
|
||||
t2 = to.split(SEP)
|
||||
b2 = base.split('#')[0].split(SEP)
|
||||
t2 = to.split('#')[0].split(SEP)
|
||||
# remove common segments (except the last segment)
|
||||
for x, y in zip(b2[:-1], t2[:-1]):
|
||||
if x != y:
|
||||
|
Loading…
Reference in New Issue
Block a user