From 8f8d72a749a39845fd03ae259533abe73dc7dcdf Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 9 Aug 2022 14:04:27 +0200 Subject: Add support for passing `ok`, `nok` as separate states to attempts --- src/construct/block_quote.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/construct/block_quote.rs') 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 `>`. -- cgit