aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/block_quote.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-09 14:04:27 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-09 14:04:27 +0200
commit8f8d72a749a39845fd03ae259533abe73dc7dcdf (patch)
treeebc54d404f5a5e7e406f6323131dae1ed7a79c50 /src/construct/block_quote.rs
parentfafcfd55e5f7ea8b87cab4bbf979730d81749402 (diff)
downloadmarkdown-rs-8f8d72a749a39845fd03ae259533abe73dc7dcdf.tar.gz
markdown-rs-8f8d72a749a39845fd03ae259533abe73dc7dcdf.tar.bz2
markdown-rs-8f8d72a749a39845fd03ae259533abe73dc7dcdf.zip
Add support for passing `ok`, `nok` as separate states to attempts
Diffstat (limited to 'src/construct/block_quote.rs')
-rw-r--r--src/construct/block_quote.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/construct/block_quote.rs b/src/construct/block_quote.rs
index df58d62..cec3dce 100644
--- a/src/construct/block_quote.rs
+++ b/src/construct/block_quote.rs
@@ -55,7 +55,11 @@ pub fn start(tokenizer: &mut Tokenizer) -> State {
usize::MAX
},
);
- tokenizer.go(state_name, StateName::BlockQuoteBefore)
+ tokenizer.attempt(
+ state_name,
+ State::Fn(StateName::BlockQuoteBefore),
+ State::Nok,
+ )
} else {
State::Nok
}
@@ -94,7 +98,11 @@ pub fn cont_start(tokenizer: &mut Tokenizer) -> State {
usize::MAX
},
);
- tokenizer.go(state_name, StateName::BlockQuoteContBefore)
+ tokenizer.attempt(
+ state_name,
+ State::Fn(StateName::BlockQuoteContBefore),
+ State::Nok,
+ )
}
/// After whitespace, before `>`.