Skip to content

Commit

Permalink
linkcheck: Fix a protocol relative URL is considered as a local file
Browse files Browse the repository at this point in the history
Since sphinx-doc#7985, a protocol relative URL (URL starts with "//") is considered
as a local file incorrectly.  This makes it to a "unchecked" URL.

refs: sphinx-doc#7985
  • Loading branch information
tk0miya committed Jul 23, 2020
1 parent 3d0818f commit 8753463
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sphinx/builders/linkcheck.py
Expand Up @@ -35,7 +35,7 @@

logger = logging.getLogger(__name__)

uri_re = re.compile('[a-z]+://')
uri_re = re.compile('([a-z]+:)?//') # matches to foo:// and // (a protocol relative URL)


DEFAULT_REQUEST_HEADERS = {
Expand Down

0 comments on commit 8753463

Please sign in to comment.