Fix mentions not being stopped by >

This commit is contained in:
Joscha 2023-01-30 17:59:46 +01:00
parent b6d69ce0b5
commit 56373135c7
2 changed files with 5 additions and 1 deletions

View file

@ -13,8 +13,9 @@ use super::util;
fn nick_char(ch: char) -> bool {
// Closely following the heim mention regex:
// https://github.com/euphoria-io/heim/blob/978c921063e6b06012fc8d16d9fbf1b3a0be1191/client/lib/stores/chat.js#L14-L15
// `>` has been experimentally confirmed to delimit mentions as well.
match ch {
',' | '.' | '!' | '?' | ';' | '&' | '<' | '\'' | '"' => false,
',' | '.' | '!' | '?' | ';' | '&' | '<' | '>' | '\'' | '"' => false,
_ => !ch.is_whitespace(),
}
}