mirror of https://github.com/zulip/zulip.git
bugdown: Start a URL with a word boundary, not a space
This fixes the bug where we were eating the preceding space. (imported from commit 9eca01e6ad828ccc31ad10693339f381333e76a7)
This commit is contained in:
parent
0f474285bf
commit
1c4bbd6a49
|
@ -33,7 +33,7 @@ class Bugdown(markdown.Extension):
|
|||
md.inlinePatterns.add('gravatar', Gravatar(r'!gravatar\((?P<email>[^)]*)\)'), '_begin')
|
||||
|
||||
# A link starts after whitespace and continues to the next whitespace.
|
||||
link_regex = r'(\s|\A)(?P<url>https?://[^\s]+)'
|
||||
link_regex = r'\b(?P<url>https?://[^\s]+)'
|
||||
md.inlinePatterns.add('autolink', AutoLink(link_regex), '_begin')
|
||||
|
||||
# We need to re-initialize the markdown engine every 30 messages
|
||||
|
|
Loading…
Reference in New Issue