diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-08-09 14:04:27 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-08-09 14:04:27 +0200 |
commit | 8f8d72a749a39845fd03ae259533abe73dc7dcdf (patch) | |
tree | ebc54d404f5a5e7e406f6323131dae1ed7a79c50 /src/construct/html_text.rs | |
parent | fafcfd55e5f7ea8b87cab4bbf979730d81749402 (diff) | |
download | markdown-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/html_text.rs')
-rw-r--r-- | src/construct/html_text.rs | 6 |
1 files changed, 5 insertions, 1 deletions
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. |