diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-08-10 10:54:43 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-08-10 10:54:43 +0200 |
commit | 3a90a49518bbc53876d3f46d8763b2fe0f03d789 (patch) | |
tree | eecaaf9586cf8632b3b6fe22794dae1f492849f5 /src/construct/code_indented.rs | |
parent | 8162222295d71ea7fd9270c7b3b9497b91db3f1f (diff) | |
download | markdown-rs-3a90a49518bbc53876d3f46d8763b2fe0f03d789.tar.gz markdown-rs-3a90a49518bbc53876d3f46d8763b2fe0f03d789.tar.bz2 markdown-rs-3a90a49518bbc53876d3f46d8763b2fe0f03d789.zip |
Add `State::Retry`
Diffstat (limited to 'src/construct/code_indented.rs')
-rw-r--r-- | src/construct/code_indented.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/construct/code_indented.rs b/src/construct/code_indented.rs index de7683d..36ae4c6 100644 --- a/src/construct/code_indented.rs +++ b/src/construct/code_indented.rs @@ -83,7 +83,7 @@ pub fn start(tokenizer: &mut Tokenizer) -> State { /// ``` pub fn at_break(tokenizer: &mut Tokenizer) -> State { match tokenizer.current { - None => after(tokenizer), + None => State::Retry(StateName::CodeIndentedAfter), Some(b'\n') => tokenizer.attempt( StateName::CodeIndentedFurtherStart, State::Next(StateName::CodeIndentedAtBreak), @@ -91,7 +91,7 @@ pub fn at_break(tokenizer: &mut Tokenizer) -> State { ), _ => { tokenizer.enter(Token::CodeFlowChunk); - inside(tokenizer) + State::Retry(StateName::CodeIndentedInside) } } } @@ -106,7 +106,7 @@ pub fn inside(tokenizer: &mut Tokenizer) -> State { match tokenizer.current { None | Some(b'\n') => { tokenizer.exit(Token::CodeFlowChunk); - at_break(tokenizer) + State::Retry(StateName::CodeIndentedAtBreak) } _ => { tokenizer.consume(); @@ -191,7 +191,7 @@ pub fn further_begin(tokenizer: &mut Tokenizer) -> State { /// ``` pub fn further_after(tokenizer: &mut Tokenizer) -> State { match tokenizer.current { - Some(b'\n') => further_start(tokenizer), + Some(b'\n') => State::Retry(StateName::CodeIndentedFurtherStart), _ => State::Nok, } } |