aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/hard_break_escape.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/construct/hard_break_escape.rs')
-rw-r--r--src/construct/hard_break_escape.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/construct/hard_break_escape.rs b/src/construct/hard_break_escape.rs
index 191ef67..19d430d 100644
--- a/src/construct/hard_break_escape.rs
+++ b/src/construct/hard_break_escape.rs
@@ -57,9 +57,9 @@ pub fn start(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {
tokenizer.enter(Token::HardBreakEscapeMarker);
tokenizer.consume(code);
tokenizer.exit(Token::HardBreakEscapeMarker);
- (State::Fn(Box::new(inside)), None)
+ (State::Fn(Box::new(inside)), 0)
}
- _ => (State::Nok, None),
+ _ => (State::Nok, 0),
}
}
@@ -74,8 +74,8 @@ fn inside(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {
match code {
Code::CarriageReturnLineFeed | Code::Char('\n' | '\r') => {
tokenizer.exit(Token::HardBreakEscape);
- (State::Ok, Some(vec![code]))
+ (State::Ok, if matches!(code, Code::None) { 0 } else { 1 })
}
- _ => (State::Nok, None),
+ _ => (State::Nok, 0),
}
}