Skip to content

Commit

Permalink
Merge pull request #8332 from sphinx-doc/8321_linkcheck_tel_links
Browse files Browse the repository at this point in the history
Fix #8321: linkcheck: ``tel:`` schema hyperlinks are detected as errors
  • Loading branch information
tk0miya committed Oct 25, 2020
2 parents f265690 + 3171a44 commit eb3d935
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion sphinx/builders/linkcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def check_uri() -> Tuple[str, str, int]:

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):
Expand Down

0 comments on commit eb3d935

Please sign in to comment.