aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/blank_line.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/construct/blank_line.rs')
-rw-r--r--src/construct/blank_line.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/construct/blank_line.rs b/src/construct/blank_line.rs
index 81b58fc..7f1d023 100644
--- a/src/construct/blank_line.rs
+++ b/src/construct/blank_line.rs
@@ -47,12 +47,12 @@ use crate::tokenizer::Tokenizer;
/// ^
/// ```
pub fn start(tokenizer: &mut Tokenizer) -> State {
- tokenizer.attempt(
- State::Next(StateName::BlankLineAfter),
- State::Next(StateName::BlankLineAfter),
- );
-
- State::Retry(space_or_tab(tokenizer))
+ if matches!(tokenizer.current, Some(b'\t' | b' ')) {
+ tokenizer.attempt(State::Next(StateName::BlankLineAfter), State::Nok);
+ State::Retry(space_or_tab(tokenizer))
+ } else {
+ State::Retry(StateName::BlankLineAfter)
+ }
}
/// At eof/eol, after optional whitespace.