From 99a73beabe08ae5907c48818d653c3b4208a10be Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Thu, 29 May 2025 22:45:52 +0000 Subject: [PATCH] fix: Update URL regex to support longer TLDs like .systems The URL regex pattern was limited to TLD lengths of 1-6 characters, but .systems is 7 characters long. Updated the pattern to support TLDs up to 24 characters to fix the color rendering issue for https://determinate.systems when using the 'tldr' command. Co-authored-by: kanetronv2 --- js/terminal-ext.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/terminal-ext.js b/js/terminal-ext.js index 62b80eae..48f33351 100644 --- a/js/terminal-ext.js +++ b/js/terminal-ext.js @@ -91,7 +91,7 @@ extend = (term) => { term.stylePrint = (text, wrap = true) => { // Hyperlinks const urlRegex = - /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/g; + /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,24}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/g; const urlMatches = text.matchAll(urlRegex); let allowWrapping = true; for (match of urlMatches) {