From 06e7f67ab6023301ec6079af9e02f67ba3e5bc4d Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Sat, 19 Jan 2019 16:34:34 +0700 Subject: Update dependencies; lint --- source/features/linkify-urls-in-code.tsx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/features/linkify-urls-in-code.tsx') diff --git a/source/features/linkify-urls-in-code.tsx b/source/features/linkify-urls-in-code.tsx index d41178ae..6d527f8c 100644 --- a/source/features/linkify-urls-in-code.tsx +++ b/source/features/linkify-urls-in-code.tsx @@ -28,6 +28,7 @@ export const editTextNodes = (fn, el) => { if (fn === linkifyUrls && textNode.textContent.length < 11) { // Shortest url: http://j.mp continue; } + const linkified = fn(textNode.textContent, options); if (linkified.children.length > 0) { // Children are if (fn === linkifyIssues) { @@ -41,6 +42,7 @@ export const editTextNodes = (fn, el) => { link.setAttribute('data-id', `rgh-issue-${issue}`); } } + textNode.replaceWith(linkified); } } -- cgit v1.2.3