From 35cbee9ede93fbf9296357765cab0e23698bfb22 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 18 May 2023 17:01:26 +0200 Subject: Remove unneeded branch --- src/construct/heading_atx.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/construct/heading_atx.rs b/src/construct/heading_atx.rs index 05b7c86..33b14a7 100644 --- a/src/construct/heading_atx.rs +++ b/src/construct/heading_atx.rs @@ -129,15 +129,10 @@ pub fn sequence_open(tokenizer: &mut Tokenizer) -> State { State::Next(StateName::HeadingAtxSequenceOpen) } // Always at least one `#`. - else if matches!(tokenizer.current, None | Some(b'\n')) { + else if matches!(tokenizer.current, None | Some(b'\t' | b'\n' | b' ')) { tokenizer.tokenize_state.size = 0; tokenizer.exit(Name::HeadingAtxSequence); State::Retry(StateName::HeadingAtxAtBreak) - } else if matches!(tokenizer.current, Some(b'\t' | b' ')) { - tokenizer.tokenize_state.size = 0; - tokenizer.exit(Name::HeadingAtxSequence); - tokenizer.attempt(State::Next(StateName::HeadingAtxAtBreak), State::Nok); - State::Retry(space_or_tab(tokenizer)) } else { tokenizer.tokenize_state.size = 0; State::Nok -- cgit