Skip to content

Commit

Permalink
remove title from link
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Mar 6, 2019
1 parent 3a03b1d commit 9dc35bf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -721,9 +721,10 @@ InlineLexer.prototype.output = function(src) {
if (cap = this.rules.link.exec(src)) {
var lastParenIndex = findClosingBracket(cap[2], '()');
if (lastParenIndex > -1) {
var removeChars = cap[2].length - lastParenIndex;
var linkLen = cap[0].length - (cap[2].length - lastParenIndex) - (cap[3] || '').length;
cap[2] = cap[2].substring(0, lastParenIndex);
cap[0] = cap[0].substring(0, cap[0].length - removeChars);
cap[0] = cap[0].substring(0, linkLen).trim();
cap[3] = '';
}
src = src.substring(cap[0].length);
this.inLink = true;
Expand Down

0 comments on commit 9dc35bf

Please sign in to comment.