Skip to content

Commit

Permalink
fix calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Jul 2, 2019
1 parent 330e4fc commit 0dc60b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/marked.js
Expand Up @@ -728,7 +728,7 @@ InlineLexer.prototype.output = function(src) {
if (cap = this.rules.link.exec(src)) {
var lastParenIndex = findClosingBracket(cap[2], '()');
if (lastParenIndex > -1) {
var linkLen = cap[0].length - (cap[2].length - lastParenIndex) - (cap[3] || '').length;
var linkLen = 4 + cap[1].length + lastParenIndex;
cap[2] = cap[2].substring(0, lastParenIndex);
cap[0] = cap[0].substring(0, linkLen).trim();
cap[3] = '';
Expand Down

0 comments on commit 0dc60b6

Please sign in to comment.