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/partial_label.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/construct/partial_label.rs') diff --git a/src/construct/partial_label.rs b/src/construct/partial_label.rs index c78278e..1cb7d4b 100644 --- a/src/construct/partial_label.rs +++ b/src/construct/partial_label.rs @@ -56,7 +56,7 @@ // To do: pass token types in. use crate::constant::LINK_REFERENCE_SIZE_MAX; -use crate::construct::partial_space_or_tab::space_or_tab_opt; +use crate::construct::partial_space_or_tab::space_or_tab; use crate::subtokenize::link; use crate::tokenizer::{Code, State, StateFnResult, TokenType, Tokenizer}; @@ -152,7 +152,7 @@ fn at_break(tokenizer: &mut Tokenizer, code: Code, mut info: Info) -> StateFnRes /// |b] /// ``` fn line_start(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFnResult { - tokenizer.go(space_or_tab_opt(), |t, c| line_begin(t, c, info))(tokenizer, code) + tokenizer.attempt_opt(space_or_tab(), |t, c| line_begin(t, c, info))(tokenizer, code) } /// After a line ending, after optional whitespace. -- cgit