aboutsummaryrefslogtreecommitdiffstats
path: root/src/content/flow.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-10 10:54:43 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-10 10:54:43 +0200
commit3a90a49518bbc53876d3f46d8763b2fe0f03d789 (patch)
treeeecaaf9586cf8632b3b6fe22794dae1f492849f5 /src/content/flow.rs
parent8162222295d71ea7fd9270c7b3b9497b91db3f1f (diff)
downloadmarkdown-rs-3a90a49518bbc53876d3f46d8763b2fe0f03d789.tar.gz
markdown-rs-3a90a49518bbc53876d3f46d8763b2fe0f03d789.tar.bz2
markdown-rs-3a90a49518bbc53876d3f46d8763b2fe0f03d789.zip
Add `State::Retry`
Diffstat (limited to 'src/content/flow.rs')
-rw-r--r--src/content/flow.rs4
1 files changed, 2 insertions, 2 deletions
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),