Skip to content

Commit

Permalink
fixup! fix: Don't compute relative URLs of already relative ones
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Mar 6, 2022
1 parent fd35665 commit b660472
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ maintain = [
quality = [
"darglint>=1.8",
"flake8-bandit>=2.1",
"bandit<1.7.3",
"flake8-black>=0.2",
"flake8-bugbear>=21.9",
"flake8-builtins>=1.5",
Expand All @@ -93,11 +94,10 @@ tests = [
"pytest>=6.2",
"pytest-cov>=3.0",
"pytest-randomly>=3.10",
"pytest-sugar>=0.9",
"pytest-xdist>=2.4",
]
typing = [
"mypy>=0.910",
"mypy>=0.910,<0.931",
"types-markdown>=3.3",
"types-toml>=0.10",
]
Expand Down
4 changes: 2 additions & 2 deletions src/mkdocs_autorefs/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ def get_item_url( # noqa: WPS234
"""
url = self._get_item_url(identifier, fallback)
if from_url is not None:
parsed = urlsplit(link)
parsed = urlsplit(url)
if not parsed.scheme and not parsed.netloc:
return relative_url(from_url, url)
return relative_url(from_url, url)
return url

def on_config(self, config: Config, **kwargs) -> Config: # noqa: W0613,R0201 (unused arguments, cannot be static)
Expand Down

0 comments on commit b660472

Please sign in to comment.