From 7ba18dd81fe055adc88a82e97934b28d9ebda600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=81=E5=B9=B4?= Date: Mon, 29 May 2017 00:25:56 +0800 Subject: [PATCH] fix(anchors): fix issue with brackets in link URL Closes #390 --- src/subParsers/stripLinkDefinitions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subParsers/stripLinkDefinitions.js b/src/subParsers/stripLinkDefinitions.js index a9c0def7..2addeba5 100644 --- a/src/subParsers/stripLinkDefinitions.js +++ b/src/subParsers/stripLinkDefinitions.js @@ -6,7 +6,7 @@ showdown.subParser('stripLinkDefinitions', function (text, options, globals) { 'use strict'; - var regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\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';