Browse Source

Don't recreate links buffer in linkifier

pull/14/head
Vitaly Puzrin 10 years ago
parent
commit
8cacac58ad
  1. 2
      lib/rules_text/linkify.js

2
lib/rules_text/linkify.js

@ -63,7 +63,7 @@ module.exports = function linkify(t, state) {
if (token.type === 'text' && LINK_SCAN_RE.test(token.content)) { if (token.type === 'text' && LINK_SCAN_RE.test(token.content)) {
text = token.content; text = token.content;
links = []; links.length = 0;
autolinker.link(text); autolinker.link(text);
if (!links.length) { continue; } if (!links.length) { continue; }

Loading…
Cancel
Save