summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-10-24 20:11:23 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-10-24 20:11:23 +0900
commit3171a44032f216a1775d86302d939e271e3ab2e9 (patch)
tree9fb4997b4de2868423bc90384c414d99f6c27a40
parent071b14884c90e807827079ee18b1677ea71833e6 (diff)
downloadsphinx-git-8321_linkcheck_tel_links.tar.gz
Fix #8321: linkcheck: ``tel:`` schema hyperlinks are detected as errors8321_linkcheck_tel_links
-rw-r--r--CHANGES1
-rw-r--r--sphinx/builders/linkcheck.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 0405e1d93..8dbbd5290 100644
--- a/CHANGES
+++ b/CHANGES
@@ -57,6 +57,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
Testing
diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py
index a9e6b05b0..85d5c5d86 100644
--- a/sphinx/builders/linkcheck.py
+++ b/sphinx/builders/linkcheck.py
@@ -213,7 +213,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):