aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/hard_break_escape.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/construct/hard_break_escape.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/construct/hard_break_escape.rs b/src/construct/hard_break_escape.rs
index 40a83ef..0585c4c 100644
--- a/src/construct/hard_break_escape.rs
+++ b/src/construct/hard_break_escape.rs
@@ -40,7 +40,7 @@
//! [html]: https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-br-element
use crate::token::Token;
-use crate::tokenizer::{Code, State, Tokenizer};
+use crate::tokenizer::{State, Tokenizer};
/// Start of a hard break (escape).
///
@@ -51,7 +51,7 @@ use crate::tokenizer::{Code, State, Tokenizer};
/// ```
pub fn start(tokenizer: &mut Tokenizer) -> State {
match tokenizer.current {
- Code::Char('\\') if tokenizer.parse_state.constructs.hard_break_escape => {
+ Some('\\') if tokenizer.parse_state.constructs.hard_break_escape => {
tokenizer.enter(Token::HardBreakEscape);
tokenizer.consume();
State::Fn(Box::new(inside))
@@ -69,7 +69,7 @@ pub fn start(tokenizer: &mut Tokenizer) -> State {
/// ```
fn inside(tokenizer: &mut Tokenizer) -> State {
match tokenizer.current {
- Code::CarriageReturnLineFeed | Code::Char('\n' | '\r') => {
+ Some('\n') => {
tokenizer.exit(Token::HardBreakEscape);
State::Ok
}