From 095522bea057b19baeec65fa889f448d7d54a99c Mon Sep 17 00:00:00 2001 From: python273 Date: Tue, 1 Aug 2017 13:56:20 +0300 Subject: [PATCH] pydoc html: parse https links --- Lib/pydoc.py | 2 +- Lib/xmlrpc/server.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 376c4459fe6b00..98318c83b182f0 100644 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -588,7 +588,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+))') diff --git a/Lib/xmlrpc/server.py b/Lib/xmlrpc/server.py index bb86fe6872aec3..4270e31af0d63c 100644 --- a/Lib/xmlrpc/server.py +++ b/Lib/xmlrpc/server.py @@ -719,11 +719,11 @@ def markup(self, text, escape=None, funcs={}, classes={}, methods={}): # hyperlinking of arbitrary strings being used as method # names. Only methods with names consisting of word characters # and '.'s are hyperlinked. - 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|\.)+))\b') - while 1: + while True: match = pattern.search(text, here) if not match: break start, end = match.span()