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_label.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 '')
-rw-r--r-- | src/construct/partial_label.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/construct/partial_label.rs b/src/construct/partial_label.rs index 718af06..a151841 100644 --- a/src/construct/partial_label.rs +++ b/src/construct/partial_label.rs @@ -136,7 +136,7 @@ pub fn at_break(tokenizer: &mut Tokenizer) -> State { tokenizer.tokenize_state.connect = true; } - inside(tokenizer) + State::Retry(StateName::LabelInside) } } } @@ -145,7 +145,7 @@ pub fn at_break(tokenizer: &mut Tokenizer) -> State { /// To do. pub fn eol_after(tokenizer: &mut Tokenizer) -> State { tokenizer.tokenize_state.connect = true; - at_break(tokenizer) + State::Retry(StateName::LabelAtBreak) } /// To do. @@ -165,12 +165,12 @@ pub fn inside(tokenizer: &mut Tokenizer) -> State { match tokenizer.current { None | Some(b'\n' | b'[' | b']') => { tokenizer.exit(Token::Data); - at_break(tokenizer) + State::Retry(StateName::LabelAtBreak) } Some(byte) => { if tokenizer.tokenize_state.size > LINK_REFERENCE_SIZE_MAX { tokenizer.exit(Token::Data); - at_break(tokenizer) + State::Retry(StateName::LabelAtBreak) } else { tokenizer.consume(); tokenizer.tokenize_state.size += 1; @@ -200,6 +200,6 @@ pub fn escape(tokenizer: &mut Tokenizer) -> State { tokenizer.tokenize_state.size += 1; State::Next(StateName::LabelInside) } - _ => inside(tokenizer), + _ => State::Retry(StateName::LabelInside), } } |