We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b63f3b commit 59ec6fbCopy full SHA for 59ec6fb
lib/marked.js
@@ -728,7 +728,7 @@ InlineLexer.prototype.output = function(src) {
728
if (cap = this.rules.link.exec(src)) {
729
var lastParenIndex = findClosingBracket(cap[2], '()');
730
if (lastParenIndex > -1) {
731
- var linkLen = cap[0].length - (cap[2].length - lastParenIndex) - (cap[3] || '').length;
+ var linkLen = 4 + cap[1].length + lastParenIndex;
732
cap[2] = cap[2].substring(0, lastParenIndex);
733
cap[0] = cap[0].substring(0, linkLen).trim();
734
cap[3] = '';
0 commit comments