Commit 4ca0dfb
committed
fix(terminal): stop link hover regex from swallowing trailing CJK text
The clickable-link regex in TierTerminal used [^\s<>()"'] which lets the
match keep eating non-ASCII chars after a URL, so a sentence like
"https://x.json,看到一大堆 JSON" highlighted the URL plus all the
trailing Chinese as one giant link.
URLs are ASCII per RFC 3986. Adding the U+0080–U+FFFF range to the
negated set makes the regex stop at the first non-ASCII char without
breaking Windows file paths (those keep the looser set so D:\桌面\foo.txt
still matches).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5c010b5 commit 4ca0dfb
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
525 | | - | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
526 | 530 | | |
527 | 531 | | |
528 | 532 | | |
| |||
0 commit comments