diff options
author | 2019-01-19 16:34:34 +0700 | |
---|---|---|
committer | 2019-01-19 16:34:34 +0700 | |
commit | 06e7f67ab6023301ec6079af9e02f67ba3e5bc4d (patch) | |
tree | 3741bd302fcc18b907993b8b17a115f77ec133f9 /source/features/linkify-urls-in-code.tsx | |
parent | 11b927189bab258a226e251c1bd87504feee51f4 (diff) | |
download | refined-github-06e7f67ab6023301ec6079af9e02f67ba3e5bc4d.tar.gz refined-github-06e7f67ab6023301ec6079af9e02f67ba3e5bc4d.tar.zst refined-github-06e7f67ab6023301ec6079af9e02f67ba3e5bc4d.zip |
Update dependencies; lint
Diffstat (limited to 'source/features/linkify-urls-in-code.tsx')
-rw-r--r-- | source/features/linkify-urls-in-code.tsx | 2 |
1 files changed, 2 insertions, 0 deletions
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 <a> if (fn === linkifyIssues) { @@ -41,6 +42,7 @@ export const editTextNodes = (fn, el) => { link.setAttribute('data-id', `rgh-issue-${issue}`); } } + textNode.replaceWith(linkified); } } |