diff options
author | Kaylem Brown-Malone <kaylem20201@gmail.com> | 2025-01-28 18:29:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-29 01:29:22 +0000 |
commit | 5b189bca684c046a43be7f1c168c3bc37109fc5b (patch) | |
tree | e93fd079be8c8b4955c42c88d9b7ef163968a06f | |
parent | 5e78d20c709cb1ab8d44ca7a8702cc26d779227c (diff) | |
download | r-alacritty-5b189bca684c046a43be7f1c168c3bc37109fc5b.tar.gz r-alacritty-5b189bca684c046a43be7f1c168c3bc37109fc5b.tar.bz2 r-alacritty-5b189bca684c046a43be7f1c168c3bc37109fc5b.zip |
Add backslash to invalid characters for URL regex
This adds the `\` character to the list of characters which will
terminate matches in Alacritty's default hint for URL recognition.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | alacritty/src/config/ui_config.rs | 2 | ||||
-rw-r--r-- | extra/man/alacritty.5.scd | 3 |
3 files changed, 4 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 59480b09..4316de2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Notable changes to the `alacritty_terminal` crate are documented in its ### Changed - Error out when socket fails to create with `--daemon` +- Default URL hints now stop before backslashes ### Fixed diff --git a/alacritty/src/config/ui_config.rs b/alacritty/src/config/ui_config.rs index 53310090..960bdbbc 100644 --- a/alacritty/src/config/ui_config.rs +++ b/alacritty/src/config/ui_config.rs @@ -37,7 +37,7 @@ use crate::config::LOG_TARGET_CONFIG; /// Regex used for the default URL hint. #[rustfmt::skip] const URL_REGEX: &str = "(ipfs:|ipns:|magnet:|mailto:|gemini://|gopher://|https://|http://|news:|file:|git://|ssh:|ftp://)\ - [^\u{0000}-\u{001F}\u{007F}-\u{009F}<>\"\\s{-}\\^⟨⟩`]+"; + [^\u{0000}-\u{001F}\u{007F}-\u{009F}<>\"\\s{-}\\^⟨⟩`\\\\]+"; #[derive(ConfigDeserialize, Default, Clone, Debug, PartialEq)] pub struct UiConfig { diff --git a/extra/man/alacritty.5.scd b/extra/man/alacritty.5.scd index 18172487..e2f5b252 100644 --- a/extra/man/alacritty.5.scd +++ b/extra/man/alacritty.5.scd @@ -740,7 +740,8 @@ post_processing = _true_++ persist = _false_++ mouse.enabled = _true_++ binding = { key = _"O"_, mods = _"Control|Shift"_ }++ -regex = _"(ipfs:|ipns:|magnet:|mailto:|gemini://|gopher://|https://|http://|news:|file:|git://|ssh:|ftp://)[^\\u0000-\\u001F\\u007F-\\u009F<>\\"\\\\s{-}\\\\^⟨⟩`]+"_ +regex = +_"(ipfs:|ipns:|magnet:|mailto:|gemini://|gopher://|https://|http://|news:|file:|git://|ssh:|ftp://)[^\\u0000-\\u001F\\u007F-\\u009F<>\\"\\\\s{-}\\\\^⟨⟩`\\\\\\\\]+"_ # KEYBOARD |