Skip to content

Commit

Permalink
Merge pull request markedjs#993 from smhg/fix-ie8-regex
Browse files Browse the repository at this point in the history
Support older regex engines
  • Loading branch information
joshbruce committed Jan 5, 2018
2 parents 5029439 + 6e172b7 commit 989953b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/marked.js
Expand Up @@ -1137,9 +1137,9 @@ function resolveUrl(base, href) {
base = baseUrls[' ' + base];

if (href.slice(0, 2) === '//') {
return base.replace(/:[^]*/, ':') + href;
return base.replace(/:[\s\S]*/, ':') + href;
} else if (href.charAt(0) === '/') {
return base.replace(/(:\/*[^/]*)[^]*/, '$1') + href;
return base.replace(/(:\/*[^/]*)[\s\S]*/, '$1') + href;
} else {
return base + href;
}
Expand Down

0 comments on commit 989953b

Please sign in to comment.