From 84ae7d3f4d3588a2cded8a35b874e8cecea648ea Mon Sep 17 00:00:00 2001 From: Ferran Basora Date: Wed, 1 May 2019 20:36:57 +0000 Subject: [PATCH] Fix conflict between path and url --- src/state.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/state.rs b/src/state.rs index cff2ba9..c1774b9 100644 --- a/src/state.rs +++ b/src/state.rs @@ -8,11 +8,11 @@ const EXCLUDE_PATTERNS: [(&'static str, &'static str); 1] = const PATTERNS: [(&'static str, &'static str); 10] = [ ( "url", - r"((https?://|git@|git://|ssh://|ftp://|file:///)[\w?=%/_.:,;~@!#$&()*+-]*)", + r"((https?://|git@|git://|ssh://|ftp://|file:///)[^ ]+)", ), ("diff_a", r"--- a/([^ ]+)"), ("diff_b", r"\+\+\+ b/([^ ]+)"), - ("path", r"[^ ]+/[^: [[:cntrl:]]]+"), + ("path", r"/?[^ :/]+/[^: [[:cntrl:]]]+"), ("color", r"#[0-9a-fA-F]{6}"), ( "uid",