From 8162222295d71ea7fd9270c7b3b9497b91db3f1f Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 10 Aug 2022 09:16:36 +0200 Subject: Rename `State::Fn` to `State::Next` --- src/content/text.rs | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'src/content/text.rs') diff --git a/src/content/text.rs b/src/content/text.rs index ff8c9eb..eb5a231 100644 --- a/src/content/text.rs +++ b/src/content/text.rs @@ -48,44 +48,44 @@ pub fn before(tokenizer: &mut Tokenizer) -> State { None => State::Ok, Some(b'!') => tokenizer.attempt( StateName::LabelStartImageStart, - State::Fn(StateName::TextBefore), - State::Fn(StateName::TextBeforeData), + State::Next(StateName::TextBefore), + State::Next(StateName::TextBeforeData), ), Some(b'&') => tokenizer.attempt( StateName::CharacterReferenceStart, - State::Fn(StateName::TextBefore), - State::Fn(StateName::TextBeforeData), + State::Next(StateName::TextBefore), + State::Next(StateName::TextBeforeData), ), Some(b'*' | b'_') => tokenizer.attempt( StateName::AttentionStart, - State::Fn(StateName::TextBefore), - State::Fn(StateName::TextBeforeData), + State::Next(StateName::TextBefore), + State::Next(StateName::TextBeforeData), ), // `autolink`, `html_text` (order does not matter) Some(b'<') => tokenizer.attempt( StateName::AutolinkStart, - State::Fn(StateName::TextBefore), - State::Fn(StateName::TextBeforeHtml), + State::Next(StateName::TextBefore), + State::Next(StateName::TextBeforeHtml), ), Some(b'[') => tokenizer.attempt( StateName::LabelStartLinkStart, - State::Fn(StateName::TextBefore), - State::Fn(StateName::TextBeforeData), + State::Next(StateName::TextBefore), + State::Next(StateName::TextBeforeData), ), Some(b'\\') => tokenizer.attempt( StateName::CharacterEscapeStart, - State::Fn(StateName::TextBefore), - State::Fn(StateName::TextBeforeHardBreakEscape), + State::Next(StateName::TextBefore), + State::Next(StateName::TextBeforeHardBreakEscape), ), Some(b']') => tokenizer.attempt( StateName::LabelEndStart, - State::Fn(StateName::TextBefore), - State::Fn(StateName::TextBeforeData), + State::Next(StateName::TextBefore), + State::Next(StateName::TextBeforeData), ), Some(b'`') => tokenizer.attempt( StateName::CodeTextStart, - State::Fn(StateName::TextBefore), - State::Fn(StateName::TextBeforeData), + State::Next(StateName::TextBefore), + State::Next(StateName::TextBeforeData), ), _ => before_data(tokenizer), } @@ -95,8 +95,8 @@ pub fn before(tokenizer: &mut Tokenizer) -> State { pub fn before_html(tokenizer: &mut Tokenizer) -> State { tokenizer.attempt( StateName::HtmlTextStart, - State::Fn(StateName::TextBefore), - State::Fn(StateName::TextBeforeData), + State::Next(StateName::TextBefore), + State::Next(StateName::TextBeforeData), ) } @@ -104,8 +104,8 @@ pub fn before_html(tokenizer: &mut Tokenizer) -> State { pub fn before_hard_break_escape(tokenizer: &mut Tokenizer) -> State { tokenizer.attempt( StateName::HardBreakEscapeStart, - State::Fn(StateName::TextBefore), - State::Fn(StateName::TextBeforeData), + State::Next(StateName::TextBefore), + State::Next(StateName::TextBeforeData), ) } @@ -117,7 +117,7 @@ pub fn before_hard_break_escape(tokenizer: &mut Tokenizer) -> State { pub fn before_data(tokenizer: &mut Tokenizer) -> State { tokenizer.attempt( StateName::DataStart, - State::Fn(StateName::TextBefore), + State::Next(StateName::TextBefore), State::Nok, ) } -- cgit