aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/partial_destination.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/construct/partial_destination.rs
parent8162222295d71ea7fd9270c7b3b9497b91db3f1f (diff)
downloadmarkdown-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_destination.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/construct/partial_destination.rs b/src/construct/partial_destination.rs
index e4cfdc3..26fadc4 100644
--- a/src/construct/partial_destination.rs
+++ b/src/construct/partial_destination.rs
@@ -99,7 +99,7 @@ pub fn start(tokenizer: &mut Tokenizer) -> State {
tokenizer.enter(tokenizer.tokenize_state.token_4.clone());
tokenizer.enter(tokenizer.tokenize_state.token_5.clone());
tokenizer.enter_with_content(Token::Data, Some(ContentType::String));
- raw(tokenizer)
+ State::Retry(StateName::DestinationRaw)
}
}
}
@@ -121,7 +121,7 @@ pub fn enclosed_before(tokenizer: &mut Tokenizer) -> State {
} else {
tokenizer.enter(tokenizer.tokenize_state.token_5.clone());
tokenizer.enter_with_content(Token::Data, Some(ContentType::String));
- enclosed(tokenizer)
+ State::Retry(StateName::DestinationEnclosed)
}
}
@@ -137,7 +137,7 @@ pub fn enclosed(tokenizer: &mut Tokenizer) -> State {
Some(b'>') => {
tokenizer.exit(Token::Data);
tokenizer.exit(tokenizer.tokenize_state.token_5.clone());
- enclosed_before(tokenizer)
+ State::Retry(StateName::DestinationEnclosedBefore)
}
Some(b'\\') => {
tokenizer.consume();
@@ -162,7 +162,7 @@ pub fn enclosed_escape(tokenizer: &mut Tokenizer) -> State {
tokenizer.consume();
State::Next(StateName::DestinationEnclosed)
}
- _ => enclosed(tokenizer),
+ _ => State::Retry(StateName::DestinationEnclosed),
}
}
@@ -220,6 +220,6 @@ pub fn raw_escape(tokenizer: &mut Tokenizer) -> State {
tokenizer.consume();
State::Next(StateName::DestinationRaw)
}
- _ => raw(tokenizer),
+ _ => State::Retry(StateName::DestinationRaw),
}
}