diff --git a/crates/terminal/src/alacritty/hyperlinks.rs b/crates/terminal/src/alacritty/hyperlinks.rs index 15acb69d5d..1dbec598c0 100644 --- a/crates/terminal/src/alacritty/hyperlinks.rs +++ b/crates/terminal/src/alacritty/hyperlinks.rs @@ -19,7 +19,7 @@ use util::paths::{PathStyle, UrlExt}; use crate::Range; -const URL_REGEX: &str = r#"(ipfs:|ipns:|magnet:|mailto:|gemini://|gopher://|https://|http://|news:|file://|git://|ssh:|ftp://)[^\u{0000}-\u{001F}\u{007F}-\u{009F}<>"\s{-}\^⟨⟩`']+"#; +const URL_REGEX: &str = r#"(ipfs:|ipns:|magnet:|mailto:|gemini://|gopher://|https://|http://|news:|file://|git://|ssh:|ftp://|zed://)[^\u{0000}-\u{001F}\u{007F}-\u{009F}<>"\s{-}\^⟨⟩`']+"#; const WIDE_CHAR_SPACERS: Flags = Flags::from_bits(Flags::LEADING_WIDE_CHAR_SPACER.bits() | Flags::WIDE_CHAR_SPACER.bits()) .unwrap(); @@ -518,6 +518,11 @@ mod tests { "mailto:bob@example.com", ], ); + re_test( + URL_REGEX, + "open zed://channel/the-channel and zed://settings/theme now", + vec!["zed://channel/the-channel", "zed://settings/theme"], + ); } #[test]