From 227e844154d9a592b80a88d7b8731d3d2f2fb3e2 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 22 Jun 2022 15:20:33 +0200 Subject: Add `attempt_opt` to tokenizer --- src/construct/code_indented.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/construct/code_indented.rs') diff --git a/src/construct/code_indented.rs b/src/construct/code_indented.rs index f476965..99445b9 100644 --- a/src/construct/code_indented.rs +++ b/src/construct/code_indented.rs @@ -45,7 +45,7 @@ //! [html-pre]: https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element //! [html-code]: https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-code-element -use super::partial_space_or_tab::{space_or_tab_min_max, space_or_tab_opt}; +use super::partial_space_or_tab::{space_or_tab, space_or_tab_min_max}; use crate::constant::TAB_SIZE; use crate::tokenizer::{Code, State, StateFnResult, TokenType, Tokenizer}; @@ -154,7 +154,7 @@ fn further_end(_tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { /// asd /// ``` fn further_begin(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { - tokenizer.go(space_or_tab_opt(), further_after)(tokenizer, code) + tokenizer.attempt_opt(space_or_tab(), further_after)(tokenizer, code) } /// After whitespace. -- cgit