Skip to content

Commit

Permalink
Allow auto-linked URLs to end with a !, without including the ! in th…
Browse files Browse the repository at this point in the history
…e url

(imported from commit 26fbf8d8318dc32f31f94f366750521afab94ac5)
  • Loading branch information
lfranchi committed Mar 5, 2014
1 parent 957486c commit 05d911b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions zerver/fixtures/bugdown-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@
"<p>end with a quote %s\"</p>",
"www.google.com"
],
[
"end with an exclamation www.google.com!",
"<p>end with an exclamation %s!</p>",
"www.google.com"
],
[
"http://www.guardian.co.uk/foo/bar",
"<p>%s</p>",
Expand Down
2 changes: 1 addition & 1 deletion zerver/lib/bugdown/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ def extendMarkdown(self, md, md_globals):
| (?:[\w.-]+\@[\w.-]+\.[\w]+) # Email is separate, since it can't have a path
)
(?= # URL must be followed by (not included in group)
[:;\?\),\.\'\"\>]* # Optional punctuation characters
[!:;\?\),\.\'\"\>]* # Optional punctuation characters
(?:\Z|\s) # followed by whitespace or end of string
)
""" % (tlds, nested_paren_chunk)
Expand Down

0 comments on commit 05d911b

Please sign in to comment.