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/label_start_link.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/label_start_link.rs')
-rw-r--r-- | src/construct/label_start_link.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/construct/label_start_link.rs b/src/construct/label_start_link.rs index 3ca51bf..456a4e9 100644 --- a/src/construct/label_start_link.rs +++ b/src/construct/label_start_link.rs @@ -28,8 +28,8 @@ //! [html-a]: https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element use super::label_end::resolve_media; +use crate::event::Name; use crate::state::State; -use crate::token::Token; use crate::tokenizer::{LabelStart, Tokenizer}; /// Start of label (link) start. @@ -42,11 +42,11 @@ pub fn start(tokenizer: &mut Tokenizer) -> State { match tokenizer.current { Some(b'[') if tokenizer.parse_state.constructs.label_start_link => { let start = tokenizer.events.len(); - tokenizer.enter(Token::LabelLink); - tokenizer.enter(Token::LabelMarker); + tokenizer.enter(Name::LabelLink); + tokenizer.enter(Name::LabelMarker); tokenizer.consume(); - tokenizer.exit(Token::LabelMarker); - tokenizer.exit(Token::LabelLink); + tokenizer.exit(Name::LabelMarker); + tokenizer.exit(Name::LabelLink); tokenizer.tokenize_state.label_start_stack.push(LabelStart { start: (start, tokenizer.events.len() - 1), balanced: false, |