Skip to content

Commit fd35665

Browse files
pawamoyoprypin
andauthored
Update src/mkdocs_autorefs/plugin.py
Co-authored-by: Oleh Prypin <[email protected]>
1 parent ca274f1 commit fd35665

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mkdocs_autorefs/plugin.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ def get_item_url( # noqa: WPS234
105105
A site-relative URL.
106106
"""
107107
url = self._get_item_url(identifier, fallback)
108-
if from_url is not None and not urlparse(url).scheme:
108+
if from_url is not None:
109+
parsed = urlsplit(link)
110+
if not parsed.scheme and not parsed.netloc:
109111
return relative_url(from_url, url)
110112
return url
111113

0 commit comments

Comments
 (0)