Remove bad trim optimization from Linkifier

This prevents whitespace from going missing after links are applied.

Fixes #558
This commit is contained in:
Daniel Imms
2017-02-19 15:17:03 -08:00
parent ae69841174
commit 99a270216c
+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);