Skip to content

Commit

Permalink
fix(anchors): fix issue with brackets in link URL
Browse files Browse the repository at this point in the history
Closes #390
  • Loading branch information
flowyear authored and tivie committed May 28, 2017
1 parent 6fbc072 commit 7ba18dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/subParsers/stripLinkDefinitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
showdown.subParser('stripLinkDefinitions', function (text, options, globals) {
'use strict';

var regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?(\S+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm;
var regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm;

// attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
text += '¨0';
Expand Down

0 comments on commit 7ba18dd

Please sign in to comment.