aboutsummaryrefslogtreecommitdiffstats
path: root/src/content/text.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/text.rs')
-rw-r--r--src/content/text.rs42
1 files changed, 21 insertions, 21 deletions
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,
)
}