fix typos

This commit is contained in:
Nikos Kouremenos 2005-10-31 23:48:36 +00:00
parent 6812e423d7
commit aba99dc208

View file

@ -1060,13 +1060,14 @@ class Interface:
# \S*[^\s\W] --> in the matching string don't match ? or ) etc.. if at the end
# so http://be) will match http://be and http://be)be) will match http://be)be
prefixes = ('http://', 'https://', 'news://', 'ftp://', 'ed2k://', 'www\.', 'ftp\.')
prefixes = (r'http://', r'https://', r'news://', r'ftp://', r'ed2k://', r'www\.', r'ftp\.')
# NOTE: it's ok to catch www.gr such stuff exist!
prefix_pattern = ''
for prefix in prefixes:
prefix_pattern += prefix + '|'
prefix_pattern = prefix_pattern[:-1] # remove last |
prefix_pattern = '(' + prefix_pattern + ')'
links = r'\b' + prefix_pattern + r'\S*[^\s\W]|'