diff options
author | 2023-08-23 13:38:05 -0400 | |
---|---|---|
committer | 2023-08-24 00:38:05 +0700 | |
commit | a845070fdd9fbde4aa63ecce7882b33335423cc4 (patch) | |
tree | cd9a484b8512ec33fa2b8e2ad4ca46c1a52ac125 /source/github-helpers | |
parent | 05099f2d2e0ba38d18b2145333e70eca86a68e2a (diff) | |
download | refined-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.tsx | 4 |
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; } |