mirror of
https://github.com/wez/wezterm.git
synced 2024-09-11 14:25:57 +03:00
Adjust hyperlink rules to handle links containing ")" appropriately (#3803)
This commit is contained in:
parent
115e629ec1
commit
f674fdd12b
@ -1622,7 +1622,7 @@ pub fn default_hyperlink_rules() -> Vec<hyperlink::Rule> {
|
||||
hyperlink::Rule::with_highlight(r"<(\w+://\S+)>", "$1", 1).unwrap(),
|
||||
// Then handle URLs not wrapped in brackets
|
||||
// and include terminating ), / or - characters, if any
|
||||
hyperlink::Rule::new(r"\b\w+://\S+[)/a-zA-Z0-9-]+", "$0").unwrap(),
|
||||
hyperlink::Rule::with_highlight(r"[^(]\b(\w+://\S+[)/a-zA-Z0-9-]+)", "$1", 1).unwrap(),
|
||||
// implicit mailto link
|
||||
hyperlink::Rule::new(r"\b\w+@[\w-]+(\.[\w-]+)+\b", "mailto:$0").unwrap(),
|
||||
]
|
||||
|
@ -68,8 +68,9 @@ config.hyperlink_rules = {
|
||||
},
|
||||
-- Then handle URLs not wrapped in brackets
|
||||
{
|
||||
regex = '\\b\\w+://\\S+[)/a-zA-Z0-9-]+',
|
||||
format = '$0',
|
||||
regex = '[^(]\\b(\\w+://\\S+[)/a-zA-Z0-9-]+)',
|
||||
format = '$1',
|
||||
highlight = 1,
|
||||
},
|
||||
-- implicit mailto link
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user