diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-26 16:37:13 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-26 16:37:13 +0200 |
commit | a6b317ac7fbc95b8584056b3cebffbf9d1bba2c6 (patch) | |
tree | fd7be2fe6d7355d3aafaf8b731f0e0b48624debc /src/construct/hard_break_escape.rs | |
parent | 297784cb925b1196d89479fa24c898703ae598d6 (diff) | |
download | markdown-rs-a6b317ac7fbc95b8584056b3cebffbf9d1bba2c6.tar.gz markdown-rs-a6b317ac7fbc95b8584056b3cebffbf9d1bba2c6.tar.bz2 markdown-rs-a6b317ac7fbc95b8584056b3cebffbf9d1bba2c6.zip |
Refactor to drastically improve perf around whitespace
Diffstat (limited to '')
-rw-r--r-- | src/construct/hard_break_escape.rs | 5 |
1 files changed, 1 insertions, 4 deletions
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, |