From 037fb65633edaad1a75a707eee7c223471d7fb00 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 12 Aug 2022 17:03:14 +0200 Subject: Remove unneeded state --- src/construct/code_fenced.rs | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) (limited to 'src/construct/code_fenced.rs') diff --git a/src/construct/code_fenced.rs b/src/construct/code_fenced.rs index e69f33c..56a2a04 100644 --- a/src/construct/code_fenced.rs +++ b/src/construct/code_fenced.rs @@ -331,27 +331,10 @@ pub fn at_non_lazy_break(tokenizer: &mut Tokenizer) -> State { State::Next(StateName::CodeFencedAfter), State::Next(StateName::CodeFencedContentBefore), ); - State::Retry(StateName::CodeFencedCloseBefore) -} - -/// Before closing fence, at eol. -/// -/// ```markdown -/// | ~~~js -/// > | console.log(1) -/// ^ -/// | ~~~ -/// ``` -pub fn close_before(tokenizer: &mut Tokenizer) -> State { - match tokenizer.current { - Some(b'\n') => { - tokenizer.enter(Name::LineEnding); - tokenizer.consume(); - tokenizer.exit(Name::LineEnding); - State::Next(StateName::CodeFencedCloseStart) - } - _ => unreachable!("expected eol"), - } + tokenizer.enter(Name::LineEnding); + tokenizer.consume(); + tokenizer.exit(Name::LineEnding); + State::Next(StateName::CodeFencedCloseStart) } /// Before closing fence, at optional whitespace. -- cgit