diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-08-10 09:16:36 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-08-10 09:16:41 +0200 |
commit | 8162222295d71ea7fd9270c7b3b9497b91db3f1f (patch) | |
tree | 77a42dab6775450836ba0ca1b5d0d2360e506d52 /src/construct/partial_label.rs | |
parent | ed2e62f99ca9cf594c677e47df9d954309b43294 (diff) | |
download | markdown-rs-8162222295d71ea7fd9270c7b3b9497b91db3f1f.tar.gz markdown-rs-8162222295d71ea7fd9270c7b3b9497b91db3f1f.tar.bz2 markdown-rs-8162222295d71ea7fd9270c7b3b9497b91db3f1f.zip |
Rename `State::Fn` to `State::Next`
Diffstat (limited to 'src/construct/partial_label.rs')
-rw-r--r-- | src/construct/partial_label.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/construct/partial_label.rs b/src/construct/partial_label.rs index 070bdc0..718af06 100644 --- a/src/construct/partial_label.rs +++ b/src/construct/partial_label.rs @@ -78,7 +78,7 @@ pub fn start(tokenizer: &mut Tokenizer) -> State { tokenizer.consume(); tokenizer.exit(tokenizer.tokenize_state.token_2.clone()); tokenizer.enter(tokenizer.tokenize_state.token_3.clone()); - State::Fn(StateName::LabelAtBreak) + State::Next(StateName::LabelAtBreak) } _ => State::Nok, } @@ -102,7 +102,7 @@ pub fn at_break(tokenizer: &mut Tokenizer) -> State { } else { match tokenizer.current { Some(b'\n') => { - let state_name = space_or_tab_eol_with_options( + let name = space_or_tab_eol_with_options( tokenizer, EolOptions { content_type: Some(ContentType::String), @@ -110,9 +110,9 @@ pub fn at_break(tokenizer: &mut Tokenizer) -> State { }, ); tokenizer.attempt( - state_name, - State::Fn(StateName::LabelEolAfter), - State::Fn(StateName::LabelAtBlankLine), + name, + State::Next(StateName::LabelEolAfter), + State::Next(StateName::LabelAtBlankLine), ) } Some(b']') => { @@ -177,7 +177,7 @@ pub fn inside(tokenizer: &mut Tokenizer) -> State { if !tokenizer.tokenize_state.seen && !matches!(byte, b'\t' | b' ') { tokenizer.tokenize_state.seen = true; } - State::Fn(if matches!(byte, b'\\') { + State::Next(if matches!(byte, b'\\') { StateName::LabelEscape } else { StateName::LabelInside @@ -198,7 +198,7 @@ pub fn escape(tokenizer: &mut Tokenizer) -> State { Some(b'[' | b'\\' | b']') => { tokenizer.consume(); tokenizer.tokenize_state.size += 1; - State::Fn(StateName::LabelInside) + State::Next(StateName::LabelInside) } _ => inside(tokenizer), } |