From d94c1e97a894cceb89237717a157d05e1a48f586 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Sun, 9 May 2021 22:33:51 +0000 Subject: Fix URL highlighting with unicode whitespace The URL highlighting regex would automatically terminate on an ascii whitespace, however there are several other forms of whitespace that are indistinguisable to a user from normal whitespace. To make things a little more intuitive, all unicode whitespace will now terminate URLs. --- alacritty/src/config/ui_config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'alacritty') diff --git a/alacritty/src/config/ui_config.rs b/alacritty/src/config/ui_config.rs index 4b520640..d34389e9 100644 --- a/alacritty/src/config/ui_config.rs +++ b/alacritty/src/config/ui_config.rs @@ -24,7 +24,7 @@ use crate::config::window::WindowConfig; /// Regex used for the default URL hint. #[rustfmt::skip] const URL_REGEX: &str = "(magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ - [^\u{0000}-\u{001F}\u{007F}-\u{009F}<>\" {-}\\^⟨⟩`]+"; + [^\u{0000}-\u{001F}\u{007F}-\u{009F}<>\"\\s{-}\\^⟨⟩`]+"; #[derive(ConfigDeserialize, Debug, PartialEq)] pub struct UiConfig { -- cgit