More actions
Will cause some bugs
No edit summary |
(Will cause some bugs) |
||
Line 411: | Line 411: | ||
var urlRgx = /\[((?:https?:)?\/\/.+?) (.+?)\]/g, | var urlRgx = /\[((?:https?:)?\/\/.+?) (.+?)\]/g, | ||
// http(s)://foo.com | // http(s)://foo.com | ||
httpRgx = /(\s*)(https?:\/\/[^\s]+)(\s*)/g, | // httpRgx = /(\s*)(https?:\/\/[^\s]+)(\s*)/g, | ||
// [[pagename]] -> [[$1]] | // [[pagename]] -> [[$1]] | ||
simplePageRgx = /\[\[([^|]*?)\]\]/g, | simplePageRgx = /\[\[([^|]*?)\]\]/g, | ||
Line 429: | Line 429: | ||
return makeLink(href, text, true); | return makeLink(href, text, true); | ||
}) | }) | ||
.replace(httpRgx, function (_match, before, href, after) { | // .replace(httpRgx, function (_match, before, href, after) { | ||
// return before + makeLink(href, href, true) + after; | |||
}) | // }) | ||
.replace(simplePageRgx, function (_match, href) { | .replace(simplePageRgx, function (_match, href) { | ||
return makeLink(href); | return makeLink(href); |