We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28aa850 commit 122d173Copy full SHA for 122d173
libraries/utils.py
@@ -184,12 +184,12 @@ def library_doc_latest_transform(url):
184
185
def generate_canonical_library_uri(uri):
186
matches = re.match(
187
- r"(?P<domainpath>https?://[^/]+(?:/[^/]+){2}/?)(?P<version>[^/]+)(?P<docpath>/[\S]+)",
+ r"https?://(?P<domainpath>[^/]+(?:/[^/]+){2}/?)(?P<version>[^/]+)(?P<docpath>/[\S]+)",
188
uri,
189
)
190
if matches.group("version") == LATEST_RELEASE_URL_PATH_STR:
191
return uri
192
- return f"{matches.group('domainpath')}{LATEST_RELEASE_URL_PATH_STR}{matches.group('docpath')}"
+ return f"https://{matches.group('domainpath')}{LATEST_RELEASE_URL_PATH_STR}{matches.group('docpath')}"
193
194
195
def get_documentation_url(library_version, latest):
0 commit comments