diff options
Diffstat (limited to 'sphinx/ext/extlinks.py')
-rw-r--r-- | sphinx/ext/extlinks.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/ext/extlinks.py b/sphinx/ext/extlinks.py index a574d665a..659a92b79 100644 --- a/sphinx/ext/extlinks.py +++ b/sphinx/ext/extlinks.py @@ -72,7 +72,8 @@ class ExternalLinksChecker(SphinxPostTransform): for alias, (base_uri, _caption) in self.app.config.extlinks.items(): if sys.version_info < (3, 7): - # Replace a leading backslash because re.escape() inserts a backslash before % on python 3.6 + # Replace a leading backslash because re.escape() inserts a backslash before % + # on python 3.6 uri_pattern = re.compile(re.escape(base_uri).replace('\\%s', '(?P<value>.+)')) else: uri_pattern = re.compile(re.escape(base_uri).replace('%s', '(?P<value>.+)')) |