diff options
Diffstat (limited to 'src/construct/hard_break_escape.rs')
-rw-r--r-- | src/construct/hard_break_escape.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/construct/hard_break_escape.rs b/src/construct/hard_break_escape.rs index cec34d5..79d8150 100644 --- a/src/construct/hard_break_escape.rs +++ b/src/construct/hard_break_escape.rs @@ -51,13 +51,12 @@ use crate::tokenizer::Tokenizer; /// | b /// ``` pub fn start(tokenizer: &mut Tokenizer) -> State { - match tokenizer.current { - Some(b'\\') if tokenizer.parse_state.constructs.hard_break_escape => { - tokenizer.enter(Name::HardBreakEscape); - tokenizer.consume(); - State::Next(StateName::HardBreakEscapeAfter) - } - _ => State::Nok, + if tokenizer.parse_state.constructs.hard_break_escape && tokenizer.current == Some(b'\\') { + tokenizer.enter(Name::HardBreakEscape); + tokenizer.consume(); + State::Next(StateName::HardBreakEscapeAfter) + } else { + State::Nok } } |