From a6b317ac7fbc95b8584056b3cebffbf9d1bba2c6 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 26 Jul 2022 16:37:13 +0200 Subject: Refactor to drastically improve perf around whitespace --- src/construct/hard_break_escape.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/construct/hard_break_escape.rs') diff --git a/src/construct/hard_break_escape.rs b/src/construct/hard_break_escape.rs index d45d685..40a83ef 100644 --- a/src/construct/hard_break_escape.rs +++ b/src/construct/hard_break_escape.rs @@ -27,7 +27,6 @@ //! ## Tokens //! //! * [`HardBreakEscape`][Token::HardBreakEscape] -//! * [`HardBreakEscapeMarker`][Token::HardBreakEscapeMarker] //! //! ## References //! @@ -37,7 +36,7 @@ //! [text]: crate::content::text //! [character_escape]: crate::construct::character_escape //! [character_reference]: crate::construct::character_reference -//! [hard_break_trailing]: crate::construct::hard_break_trailing +//! [hard_break_trailing]: crate::construct::partial_whitespace //! [html]: https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-br-element use crate::token::Token; @@ -54,9 +53,7 @@ pub fn start(tokenizer: &mut Tokenizer) -> State { match tokenizer.current { Code::Char('\\') if tokenizer.parse_state.constructs.hard_break_escape => { tokenizer.enter(Token::HardBreakEscape); - tokenizer.enter(Token::HardBreakEscapeMarker); tokenizer.consume(); - tokenizer.exit(Token::HardBreakEscapeMarker); State::Fn(Box::new(inside)) } _ => State::Nok, -- cgit