summaryrefslogtreecommitdiff
path: root/source/github-helpers
diff options
context:
space:
mode:
authorGravatar Katsute <58778985+Katsute@users.noreply.github.com> 2023-08-23 13:38:05 -0400
committerGravatar GitHub <noreply@github.com> 2023-08-24 00:38:05 +0700
commita845070fdd9fbde4aa63ecce7882b33335423cc4 (patch)
treecd9a484b8512ec33fa2b8e2ad4ca46c1a52ac125 /source/github-helpers
parent05099f2d2e0ba38d18b2145333e70eca86a68e2a (diff)
downloadrefined-github-a845070fdd9fbde4aa63ecce7882b33335423cc4.tar.gz
refined-github-a845070fdd9fbde4aa63ecce7882b33335423cc4.tar.zst
refined-github-a845070fdd9fbde4aa63ecce7882b33335423cc4.zip
Discard truncated linkified URLs (#6844)
Diffstat (limited to 'source/github-helpers')
-rw-r--r--source/github-helpers/dom-formatters.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/github-helpers/dom-formatters.tsx b/source/github-helpers/dom-formatters.tsx
index 819c6a7e..10ec8062 100644
--- a/source/github-helpers/dom-formatters.tsx
+++ b/source/github-helpers/dom-formatters.tsx
@@ -80,6 +80,10 @@ export function linkifyURLs(element: Element): Element[] | void {
},
});
+ if (linkified.lastChild?.textContent === '…') { // Link is followed by …
+ return;
+ }
+
if (linkified.children.length === 0) { // Children are <a>
return;
}