diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-09-10 21:51:57 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-10 21:51:57 +0300 |
| commit | 425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch) | |
| tree | e52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/src/config/url.zig | |
| parent | 90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff) | |
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/config/url.zig')
| -rw-r--r-- | vendor/libghostty-vt/src/config/url.zig | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/vendor/libghostty-vt/src/config/url.zig b/vendor/libghostty-vt/src/config/url.zig index 2621898e..463ea9bf 100644 --- a/vendor/libghostty-vt/src/config/url.zig +++ b/vendor/libghostty-vt/src/config/url.zig @@ -52,10 +52,6 @@ const no_trailing_colon = \\(?<!:) ; -const trailing_spaces_at_eol = - \\(?: +(?= *$))? -; - const dotted_path_lookahead = \\(?=[\w\-.~:\/?#@!$&*+;=%]*\.) ; @@ -92,13 +88,11 @@ const rooted_or_relative_path_branch = path_chars ++ "+" ++ dotted_path_space_segments ++ no_trailing_colon ++ - trailing_spaces_at_eol ++ "|" ++ non_dotted_path_lookahead ++ path_chars ++ "+" ++ any_path_space_segments ++ no_trailing_colon ++ - trailing_spaces_at_eol ++ ")"; // Branch 3: Bare relative paths such as src/config/url.zig. @@ -110,8 +104,7 @@ const bare_relative_path_branch = dotted_path_lookahead ++ bare_relative_path_prefix ++ path_chars ++ "+" ++ - no_trailing_colon ++ - trailing_spaces_at_eol; + no_trailing_colon; pub const regex = scheme_url_branch ++ @@ -282,7 +275,7 @@ test "url regex" { }, .{ .input = "../example.py ", - .expect = "../example.py ", + .expect = "../example.py", }, .{ .input = "first time ../example.py contributor ", @@ -341,11 +334,12 @@ test "url regex" { .input = "IPv6 in markdown [link](http://[2001:db8::1]/docs)", .expect = "http://[2001:db8::1]/docs", }, - // File paths with spaces + // Trailing whitespace isn't part of a detected file path. .{ .input = "./spaces-end. ", - .expect = "./spaces-end. ", + .expect = "./spaces-end.", }, + // File paths with internal spaces .{ .input = "./space middle", .expect = "./space middle", |
