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/html_text.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/construct/html_text.rs') diff --git a/src/construct/html_text.rs b/src/construct/html_text.rs index 1c1f9e6..c1dfaca 100644 --- a/src/construct/html_text.rs +++ b/src/construct/html_text.rs @@ -659,7 +659,11 @@ pub fn line_ending_before(tokenizer: &mut Tokenizer) -> State { /// ``` pub fn line_ending_after(tokenizer: &mut Tokenizer) -> State { let state_name = space_or_tab(tokenizer); - tokenizer.attempt_opt(state_name, StateName::HtmlTextLineEndingAfterPrefix) + tokenizer.attempt( + state_name, + State::Fn(StateName::HtmlTextLineEndingAfterPrefix), + State::Fn(StateName::HtmlTextLineEndingAfterPrefix), + ) } /// After a line ending, after indent. -- cgit