better control word checking for matches

This commit is contained in:
Daniella / Tove 2024-11-15 17:19:30 +01:00
parent 901246abac
commit 700fb1e266
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -261,7 +261,9 @@ fn read_block_dyn(
if str_words[i + 1] == ">" { if str_words[i + 1] == ">" {
i += 1; i += 1;
let cword = &str_words[i + 1]; let cword = &str_words[i + 1];
if cword.contains(|c| c == '?' || c == '!') { if cword.contains(|c| c == '?' || c == '!')
&& !cword.contains(|c: char| c == '^' || !c.is_ascii_punctuation())
{
i += 1; i += 1;
} }
let pushing = if cword.contains('?') { let pushing = if cword.contains('?') {