From 3a90a49518bbc53876d3f46d8763b2fe0f03d789 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 10 Aug 2022 10:54:43 +0200 Subject: Add `State::Retry` --- src/content/flow.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/content/flow.rs') diff --git a/src/content/flow.rs b/src/content/flow.rs index cd913c6..886b5f0 100644 --- a/src/content/flow.rs +++ b/src/content/flow.rs @@ -67,7 +67,7 @@ pub fn start(tokenizer: &mut Tokenizer) -> State { ), // Actual parsing: blank line? Indented code? Indented anything? // Also includes `-` which can be a setext heading underline or a thematic break. - None | Some(b'\t' | b'\n' | b' ' | b'-') => before_blank_line(tokenizer), + None | Some(b'\t' | b'\n' | b' ' | b'-') => State::Retry(StateName::FlowBlankLineBefore), Some(_) => tokenizer.attempt( StateName::ParagraphStart, State::Next(StateName::FlowAfter), @@ -76,7 +76,7 @@ pub fn start(tokenizer: &mut Tokenizer) -> State { } } -pub fn before_blank_line(tokenizer: &mut Tokenizer) -> State { +pub fn blank_line_before(tokenizer: &mut Tokenizer) -> State { tokenizer.attempt( StateName::BlankLineStart, State::Next(StateName::FlowBlankLineAfter), -- cgit