Bugdown: Elipsis followed by TLD should not be linkified. Trac #1388.

(imported from commit 3929e4bc68872e5f5ed58f35dd1b4eb53a2e5990)
This commit is contained in:
Kevin Mehall 2013-06-20 18:06:52 -04:00
parent 0c01274989
commit 4f5b4fdb67
2 changed files with 2 additions and 1 deletions

View File

@ -565,7 +565,7 @@ class Bugdown(markdown.Extension):
# This rule must come after the http_autolink rule we add above to avoid double
# linkifying.
tlds = '|'.join(list_of_tlds())
link_regex = r"\b(?P<url>[^\s]+\.(%s)(?:/[^\s()\":]*?|(/[^\s()\":]*\([^\s()\":]*\)[^\s()\":]*))?)(?=([:;\?\),\.\'\"]\Z|[:;\?\),\.\'\"]\s|\Z|\s))" % (tlds,)
link_regex = r"\b(?P<url>([^\s\.]+\.)+(%s)(?:/[^\s()\":]*?|(/[^\s()\":]*\([^\s()\":]*\)[^\s()\":]*))?)(?=([:;\?\),\.\'\"]\Z|[:;\?\),\.\'\"]\s|\Z|\s))" % (tlds,)
md.inlinePatterns.add('autolink', AutoLink(link_regex), '>http_autolink')
md.preprocessors.add('hanging_ulists',

View File

@ -2150,6 +2150,7 @@ int x = 3
# Just because it has a TLD and parentheses in it doesn't mean it's a link. Trac #1364
('a.commandstuff()', '<p>a.commandstuff()</p>', ''),
('love...it', '<p>love...it</p>', ''),
]
for inline_url, reference, url in conversions: