diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-08-11 13:45:24 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-08-11 13:45:24 +0200 |
commit | 6eb2f644057f371841fe25330a57ee185f91c7af (patch) | |
tree | 7b4d02586339d1a7f82104b4473d9ac243b3abf9 /src/subtokenize.rs | |
parent | 2d35cbfceace81a217cd0fbdae7a8777c7a6465e (diff) | |
download | markdown-rs-6eb2f644057f371841fe25330a57ee185f91c7af.tar.gz markdown-rs-6eb2f644057f371841fe25330a57ee185f91c7af.tar.bz2 markdown-rs-6eb2f644057f371841fe25330a57ee185f91c7af.zip |
Refactor to move some code to `state.rs`
Diffstat (limited to 'src/subtokenize.rs')
-rw-r--r-- | src/subtokenize.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/subtokenize.rs b/src/subtokenize.rs index bf6a106..c545043 100644 --- a/src/subtokenize.rs +++ b/src/subtokenize.rs @@ -22,7 +22,8 @@ //! before any level that can include references can be parsed. use crate::parser::ParseState; -use crate::tokenizer::{ContentType, Event, EventType, State, StateName, Tokenizer}; +use crate::state::{Name, State}; +use crate::tokenizer::{ContentType, Event, EventType, Tokenizer}; use crate::util::edit_map::EditMap; /// Create a link between two [`Event`][]s. @@ -79,9 +80,9 @@ pub fn subtokenize(events: &mut Vec<Event>, parse_state: &ParseState) -> bool { let mut tokenizer = Tokenizer::new(event.point.clone(), parse_state); // Substate. let mut state = State::Next(if link.content_type == ContentType::String { - StateName::StringStart + Name::StringStart } else { - StateName::TextStart + Name::TextStart }); // Loop through links to pass them in order to the subtokenizer. |