mirror of https://github.com/zulip/zulip.git
Bugdown: Elipsis followed by TLD should not be linkified. Trac #1388.
(imported from commit 3929e4bc68872e5f5ed58f35dd1b4eb53a2e5990)
This commit is contained in:
parent
0c01274989
commit
4f5b4fdb67
|
@ -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',
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue