mirror of
https://github.com/alacritty/alacritty.git
synced 2025-04-14 17:53:03 -04:00
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.
This commit is contained in:
parent
5e78d20c70
commit
5b189bca68
3 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue