diff --git a/src/lexer.rs b/src/lexer.rs index d9fed26..dbb494a 100644 --- a/src/lexer.rs +++ b/src/lexer.rs @@ -261,7 +261,9 @@ fn read_block_dyn( if str_words[i + 1] == ">" { 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; } let pushing = if cword.contains('?') {