diff options
author | Titus Wormer <tituswormer@gmail.com> | 2023-05-18 17:01:26 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2023-05-18 17:01:26 +0200 |
commit | 35cbee9ede93fbf9296357765cab0e23698bfb22 (patch) | |
tree | 485713b1f9c4c5c62e1a38dc63d3bdab97829204 /src | |
parent | 7340a46b5c7fdb05796377d8c73c4843b6ae2876 (diff) | |
download | markdown-rs-35cbee9ede93fbf9296357765cab0e23698bfb22.tar.gz markdown-rs-35cbee9ede93fbf9296357765cab0e23698bfb22.tar.bz2 markdown-rs-35cbee9ede93fbf9296357765cab0e23698bfb22.zip |
Remove unneeded branch
Diffstat (limited to 'src')
-rw-r--r-- | src/construct/heading_atx.rs | 7 |
1 files changed, 1 insertions, 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 |