Don't break links at apostrophes. #485
This commit is contained in:
parent
09a7bc6026
commit
64944b5132
@ -27,8 +27,8 @@ Linkify =
|
|||||||
Linkify.process @nodes.comment
|
Linkify.process @nodes.comment
|
||||||
|
|
||||||
process: (node) ->
|
process: (node) ->
|
||||||
test = /[^\s'"]+/g
|
test = /[^\s"]+/g
|
||||||
space = /[\s'"]/
|
space = /[\s"]/
|
||||||
snapshot = $.X './/br|.//text()', node
|
snapshot = $.X './/br|.//text()', node
|
||||||
i = 0
|
i = 0
|
||||||
links = []
|
links = []
|
||||||
@ -80,7 +80,7 @@ Linkify =
|
|||||||
| # This should account for virtually all links posted without http:
|
| # This should account for virtually all links posted without http:
|
||||||
([-a-z\d]+[.])+(
|
([-a-z\d]+[.])+(
|
||||||
aero|asia|biz|cat|com|coop|dance|info|int|jobs|mobi|moe|museum|name|net|org|post|pro|tel|travel|xxx|xyz|edu|gov|mil|[a-z]{2}
|
aero|asia|biz|cat|com|coop|dance|info|int|jobs|mobi|moe|museum|name|net|org|post|pro|tel|travel|xxx|xyz|edu|gov|mil|[a-z]{2}
|
||||||
)([:/]|(?![^\s'"]))
|
)([:/]|(?![^\s"]))
|
||||||
| # IPv4 Addresses
|
| # IPv4 Addresses
|
||||||
[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}
|
[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}
|
||||||
| # E-mails
|
| # E-mails
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user