aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/construct/heading_atx.rs7
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