mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
fix(excludeTrailingPunctuationFromURL): add comma to punctuation list
Closes #354
This commit is contained in:
parent
759a334e13
commit
fa35fd5e7e
BIN
dist/showdown.js
vendored
BIN
dist/showdown.js
vendored
Binary file not shown.
BIN
dist/showdown.js.map
vendored
BIN
dist/showdown.js.map
vendored
Binary file not shown.
BIN
dist/showdown.min.js
vendored
BIN
dist/showdown.min.js
vendored
Binary file not shown.
BIN
dist/showdown.min.js.map
vendored
BIN
dist/showdown.min.js.map
vendored
Binary file not shown.
|
@ -1,7 +1,7 @@
|
|||
// url allowed chars [a-z\d_.~:/?#[]@!$&'()*+,;=-]
|
||||
|
||||
var simpleURLRegex = /\b(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+)()(?=\s|$)(?!["<>])/gi,
|
||||
simpleURLRegex2 = /\b(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?()]?)(?=\s|$)(?!["<>])/gi,
|
||||
simpleURLRegex2 = /\b(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()"\[\]]?)(?=\s|$)(?!["<>])/gi,
|
||||
//simpleURLRegex3 = /\b(((https?|ftp):\/\/|www\.)[a-z\d.-]+\.[a-z\d_.~:/?#\[\]@!$&'()*+,;=-]+?)([.!?()]?)(?=\s|$)(?!["<>])/gi,
|
||||
delimUrlRegex = /<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)>/gi,
|
||||
simpleMailRegex = /(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,
|
||||
|
|
|
@ -2,3 +2,5 @@
|
|||
<p>url <a href="http://www.google.com">http://www.google.com</a>!</p>
|
||||
<p>url <a href="http://www.google.com">http://www.google.com</a>? foo</p>
|
||||
<p>url (<a href="http://www.google.com">http://www.google.com</a>) bazinga</p>
|
||||
<p>url [<a href="http://www.google.com">http://www.google.com</a>] bazinga</p>
|
||||
<p>url <a href="http://www.google.com">http://www.google.com</a>, bar</p>
|
||||
|
|
|
@ -5,3 +5,7 @@ url http://www.google.com!
|
|||
url http://www.google.com? foo
|
||||
|
||||
url (http://www.google.com) bazinga
|
||||
|
||||
url [http://www.google.com] bazinga
|
||||
|
||||
url http://www.google.com, bar
|
||||
|
|
Loading…
Reference in New Issue
Block a user