Merge pull request #8332 from sphinx-doc/8321_linkcheck_tel_links

Fix #8321: linkcheck: ``tel:`` schema hyperlinks are detected as errors
This commit is contained in:
Takeshi KOMIYA 2020-10-25 18:48:50 +09:00 committed by GitHub
commit eb3d9355f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -59,6 +59,7 @@ Bugs fixed
* #8239: Failed to refer a token in productionlist if it is indented
* #8268: linkcheck: Report HTTP errors when ``linkcheck_anchors`` is ``True``
* #8245: linkcheck: take source directory into account for local files
* #8321: linkcheck: ``tel:`` schema hyperlinks are detected as errors
* #6914: figure numbers are unexpectedly assigned to uncaptioned items
* #8320: make "inline" line numbers un-selectable

View File

@ -212,7 +212,7 @@ class CheckExternalLinksBuilder(Builder):
def check(docname: str) -> Tuple[str, str, int]:
# check for various conditions without bothering the network
if len(uri) == 0 or uri.startswith(('#', 'mailto:')):
if len(uri) == 0 or uri.startswith(('#', 'mailto:', 'tel:')):
return 'unchecked', '', 0
elif not uri.startswith(('http:', 'https:')):
if uri_re.match(uri):