From 6c0a17cccfe3b2db804464fc17356a95754ebfe9 Mon Sep 17 00:00:00 2001 From: Ben Kircher Date: Wed, 4 Feb 2026 14:51:17 +0100 Subject: [PATCH] Fix clicking bare relative file paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related to #1972 The URL regex for file path detection requires paths to start with `../`, `./`, or `/`. For bare relative paths like `"src/config/url.zig"`, the regex could only match starting at the first `/`, producing `"/config/url.zig"` as a result — always dropping the first part of the path. Fix: added a third top-level alternative to the regex. This matches bare relative paths where: 1. The first component is word characters (possibly with dots/dashes): `[\w][\w\-.]*\/` 2. The remaining path must contain a dot (via positive lookahead) — this requires a file extension to avoid false positives on text like input/output 3. Add a `(?