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/partial_data.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/partial_data.rs')
-rw-r--r-- | src/construct/partial_data.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/construct/partial_data.rs b/src/construct/partial_data.rs index 5450ff2..a68f359 100644 --- a/src/construct/partial_data.rs +++ b/src/construct/partial_data.rs @@ -23,7 +23,7 @@ pub fn start(tokenizer: &mut Tokenizer) -> State { tokenizer.consume(); State::Next(StateName::DataInside) } - _ => at_break(tokenizer), + _ => State::Retry(StateName::DataAtBreak), } } @@ -48,7 +48,7 @@ pub fn at_break(tokenizer: &mut Tokenizer) -> State { } _ => { tokenizer.enter(Token::Data); - inside(tokenizer) + State::Retry(StateName::DataInside) } } } @@ -68,7 +68,7 @@ pub fn inside(tokenizer: &mut Tokenizer) -> State { if done { tokenizer.exit(Token::Data); - at_break(tokenizer) + State::Retry(StateName::DataAtBreak) } else { tokenizer.consume(); State::Next(StateName::DataInside) |