1
0
mirror of https://github.com/django/django.git synced 2025-04-15 04:44:37 +00:00

[5.1.x] Fixed typo in source file linking Sphinx extension.

Backport of 289f48c71b0fdd058defb29879368897fb837021 from main.
This commit is contained in:
Michael 2024-07-01 10:32:48 -04:00 committed by Natalia
parent 695e3df1ad
commit 18d660d720

View File

@ -143,7 +143,7 @@ def github_linkcode_resolve(domain, info, *, version, next_version):
branch = get_branch(version=version, next_version=next_version)
relative_path = path.relative_to(pathlib.Path(__file__).parents[2])
# Use "/" explicitely to join the path parts since str(file), on Windows,
# Use "/" explicitly to join the path parts since str(file), on Windows,
# uses the Windows path separator which is incorrect for URLs.
url_path = "/".join(relative_path.parts)
return f"https://github.com/django/django/blob/{branch}/{url_path}#L{lineno}"