Merge pull request #559 from Tyriar/558_linkify_bad_trim

Remove bad trim optimization from Linkifier
This commit is contained in:
Daniel Imms
2017-02-20 03:17:42 -08:00
committed by GitHub
+1 -1
View File
@@ -148,7 +148,7 @@ export class Linkifier {
const searchIndex = node.textContent.indexOf(uri);
if (searchIndex >= 0) {
const linkElement = this._createAnchorElement(uri, handler);
if (node.textContent.trim().length === uri.length) {
if (node.textContent.length === uri.length) {
// Matches entire string
if (node.nodeType === Node.TEXT_NODE) {
this._replaceNode(node, linkElement);