From c96357be75615695cba500ba086f8e75ad1fe38d Mon Sep 17 00:00:00 2001 From: ejunga Date: Mon, 2 Jun 2025 11:13:57 -0400 Subject: [PATCH] Fix text highlighting for tdx update --- tdx-enhanced.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tdx-enhanced.js b/tdx-enhanced.js index 3fd7a1f..e34ce7f 100644 --- a/tdx-enhanced.js +++ b/tdx-enhanced.js @@ -1084,7 +1084,11 @@ } } else { if (re && link) { - element = link + let text = link.innerText + link.innerText = "" + element = link.appendChild(document.createElement("span")) + element.innerText = text + element.style.lineHeight = "1.4" //reset regex re.lastIndex = 0 }