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_title.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 '')
-rw-r--r-- | src/construct/partial_title.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/construct/partial_title.rs b/src/construct/partial_title.rs index 1d3e9b2..9521d32 100644 --- a/src/construct/partial_title.rs +++ b/src/construct/partial_title.rs @@ -50,7 +50,7 @@ pub fn start(tokenizer: &mut Tokenizer) -> State { tokenizer.enter(tokenizer.tokenize_state.token_2.clone()); tokenizer.consume(); tokenizer.exit(tokenizer.tokenize_state.token_2.clone()); - State::Fn(StateName::TitleBegin) + State::Next(StateName::TitleBegin) } _ => State::Nok, } @@ -98,7 +98,7 @@ pub fn at_break(tokenizer: &mut Tokenizer) -> State { State::Nok } 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), @@ -107,9 +107,9 @@ pub fn at_break(tokenizer: &mut Tokenizer) -> State { ); tokenizer.attempt( - state_name, - State::Fn(StateName::TitleAfterEol), - State::Fn(StateName::TitleAtBlankLine), + name, + State::Next(StateName::TitleAfterEol), + State::Next(StateName::TitleAtBlankLine), ) } Some(b'"' | b'\'' | b')') @@ -166,7 +166,7 @@ pub fn inside(tokenizer: &mut Tokenizer) -> State { } Some(byte) => { tokenizer.consume(); - State::Fn(if matches!(byte, b'\\') { + State::Next(if matches!(byte, b'\\') { StateName::TitleEscape } else { StateName::TitleInside @@ -185,7 +185,7 @@ pub fn escape(tokenizer: &mut Tokenizer) -> State { match tokenizer.current { Some(b'"' | b'\'' | b')') => { tokenizer.consume(); - State::Fn(StateName::TitleInside) + State::Next(StateName::TitleInside) } _ => inside(tokenizer), } |