aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/character_escape.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/construct/character_escape.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/construct/character_escape.rs b/src/construct/character_escape.rs
index 02e8b62..4419d7a 100644
--- a/src/construct/character_escape.rs
+++ b/src/construct/character_escape.rs
@@ -63,7 +63,8 @@ pub fn start(tokenizer: &mut Tokenizer) -> State {
/// ```
fn inside(tokenizer: &mut Tokenizer) -> State {
match tokenizer.current {
- Some(byte) if byte.is_ascii_punctuation() => {
+ // ASCII punctuation.
+ Some(b'!'..=b'/' | b':'..=b'@' | b'['..=b'`' | b'{'..=b'~') => {
tokenizer.enter(Token::CharacterEscapeValue);
tokenizer.consume();
tokenizer.exit(Token::CharacterEscapeValue);