diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-08-11 14:53:42 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-08-11 14:53:42 +0200 |
commit | d87dc75500a2e73d9521135054b42c18e6eae987 (patch) | |
tree | 4bc3f4a72894db3ec5ed4069841c6be5be69713d /src/construct/hard_break_escape.rs | |
parent | 6eb2f644057f371841fe25330a57ee185f91c7af (diff) | |
download | markdown-rs-d87dc75500a2e73d9521135054b42c18e6eae987.tar.gz markdown-rs-d87dc75500a2e73d9521135054b42c18e6eae987.tar.bz2 markdown-rs-d87dc75500a2e73d9521135054b42c18e6eae987.zip |
Refactor to move some code to `event.rs`
Diffstat (limited to 'src/construct/hard_break_escape.rs')
-rw-r--r-- | src/construct/hard_break_escape.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/construct/hard_break_escape.rs b/src/construct/hard_break_escape.rs index 482648f..9af5b83 100644 --- a/src/construct/hard_break_escape.rs +++ b/src/construct/hard_break_escape.rs @@ -39,8 +39,8 @@ //! [hard_break_trailing]: crate::construct::partial_whitespace //! [html]: https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-br-element -use crate::state::{Name, State}; -use crate::token::Token; +use crate::event::Name; +use crate::state::{Name as StateName, State}; use crate::tokenizer::Tokenizer; /// Start of a hard break (escape). @@ -53,9 +53,9 @@ use crate::tokenizer::Tokenizer; pub fn start(tokenizer: &mut Tokenizer) -> State { match tokenizer.current { Some(b'\\') if tokenizer.parse_state.constructs.hard_break_escape => { - tokenizer.enter(Token::HardBreakEscape); + tokenizer.enter(Name::HardBreakEscape); tokenizer.consume(); - State::Next(Name::HardBreakEscapeAfter) + State::Next(StateName::HardBreakEscapeAfter) } _ => State::Nok, } @@ -71,7 +71,7 @@ pub fn start(tokenizer: &mut Tokenizer) -> State { pub fn after(tokenizer: &mut Tokenizer) -> State { match tokenizer.current { Some(b'\n') => { - tokenizer.exit(Token::HardBreakEscape); + tokenizer.exit(Name::HardBreakEscape); State::Ok } _ => State::Nok, |