aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/blank_line.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/blank_line.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/blank_line.rs')
-rw-r--r--src/construct/blank_line.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/construct/blank_line.rs b/src/construct/blank_line.rs
index b12c2c4..22dfdc0 100644
--- a/src/construct/blank_line.rs
+++ b/src/construct/blank_line.rs
@@ -47,7 +47,11 @@ use crate::tokenizer::{State, StateName, Tokenizer};
/// ```
pub fn start(tokenizer: &mut Tokenizer) -> State {
let state_name = space_or_tab(tokenizer);
- tokenizer.attempt_opt(state_name, StateName::BlankLineAfter)
+ tokenizer.attempt(
+ state_name,
+ State::Fn(StateName::BlankLineAfter),
+ State::Fn(StateName::BlankLineAfter),
+ )
}
/// After zero or more spaces or tabs, before a line ending or EOF.