Skip to content

Commit

Permalink
Merge pull request #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 08d2512 + d978de4 commit 398bb71
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 398bb71

Please sign in to comment.