mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
## Summary Paths inside parentheses without a preceding space (e.g. `Update(.claude/skills/sandbox/SKILL.md)` or `Write(/test/cool.rs)` from Claude Code output) were not clickable in the terminal. The `(` character was allowed as a middle character in the default path hyperlink regex, causing the entire `Update(.path/here` to be matched as a single invalid path. **Changes:** - Remove `(` from the middle-chars alternation (`[:(]` → `:`) in the default path hyperlink regex, so `(` always acts as a path boundary — consistent with it already being excluded from first and last character sets. Preserves upstream's space exclusion after `:`. - Iterate all regex matches in the line instead of only the first, so the correct path (which may be the second match after a prefix like `Update`) is found. This also simplifies the code by removing the separate hovered-word search logic. **Known tradeoff:** Filenames with parentheses in the middle (e.g. `docker-compose.prod(copy).yml`) are no longer matched as a single path. This is uncommon in terminal output contexts (compiler errors, stack traces, tool output) and is documented with a `should_panic` test. **What doesn't break:** - `(/path/file.js:321:13)` — `(` at word start is excluded by the first-char rule (unchanged) - Node.js stack traces like `at fn (/path/file.js:10:5)` — space before `(` makes it a separate word - All 38 terminal hyperlink tests pass Related: #18556, #23774 Release Notes: - Fixed terminal path detection for paths inside parentheses without preceding space (e.g. `Update(path)` or `Write(path)` patterns from CLI tool output) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||