Merge pull request #3175 from chapel/fix-autolink-regex

FIX: Remove g and m flags from autolink regex
This commit is contained in:
Régis Hanol 2015-02-06 09:56:52 +01:00
commit 4db3caec7c

View file

@ -3,7 +3,7 @@
a hrefs for them.
**/
var urlReplacerArgs = {
matcher: /^((?:https?:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.])(?:[^\s()<>]+|\([^\s()<>]+\))+(?:\([^\s()<>]+\)|[^`!()\[\]{};:'".,<>?«»“”‘’\s]))/gm,
matcher: /^((?:https?:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.])(?:[^\s()<>]+|\([^\s()<>]+\))+(?:\([^\s()<>]+\)|[^`!()\[\]{};:'".,<>?«»“”‘’\s]))/,
spaceOrTagBoundary: true,
emitter: function(matches) {