From 9cb3dae66dd1f365fc690500f92810e285664087 Mon Sep 17 00:00:00 2001 From: owebeeone Date: Thu, 7 May 2020 19:05:21 +1000 Subject: [PATCH] Update pydoc.py to support markup text with https links Currently ftp and http are interpreted as hyperlinks. Given unencrypted links are increasingly unsupported https should become a first class supported hyperlink prefix. --- Lib/pydoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/pydoc.py b/Lib/pydoc.py index dc3377d68f8caa4..f172700a15f9d94 100644 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -584,7 +584,7 @@ def markup(self, text, escape=None, funcs={}, classes={}, methods={}): escape = escape or self.escape results = [] here = 0 - pattern = re.compile(r'\b((http|ftp)://\S+[\w/]|' + pattern = re.compile(r'\b((http|https|ftp)://\S+[\w/]|' r'RFC[- ]?(\d+)|' r'PEP[- ]?(\d+)|' r'(self\.)?(\w+))')