aboutsummaryrefslogtreecommitdiffstats
path: root/src/content/text.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-10 09:16:36 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-10 09:16:41 +0200
commit8162222295d71ea7fd9270c7b3b9497b91db3f1f (patch)
tree77a42dab6775450836ba0ca1b5d0d2360e506d52 /src/content/text.rs
parented2e62f99ca9cf594c677e47df9d954309b43294 (diff)
downloadmarkdown-rs-8162222295d71ea7fd9270c7b3b9497b91db3f1f.tar.gz
markdown-rs-8162222295d71ea7fd9270c7b3b9497b91db3f1f.tar.bz2
markdown-rs-8162222295d71ea7fd9270c7b3b9497b91db3f1f.zip
Rename `State::Fn` to `State::Next`
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,
)
}