From d87dc75500a2e73d9521135054b42c18e6eae987 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 11 Aug 2022 14:53:42 +0200 Subject: Refactor to move some code to `event.rs` --- src/construct/label_start_link.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/construct/label_start_link.rs') 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, -- cgit