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()