aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/label_start_link.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-07 18:56:06 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-07 18:56:06 +0200
commit92b42e06f943338ce8b54b7e22cbb116ff598fa6 (patch)
treeff51df093f52dc33bfac5e1c236b41cfbd21c220 /src/construct/label_start_link.rs
parentfdb1f1694f44cfbc59d303a10371300b48d74627 (diff)
downloadmarkdown-rs-92b42e06f943338ce8b54b7e22cbb116ff598fa6.tar.gz
markdown-rs-92b42e06f943338ce8b54b7e22cbb116ff598fa6.tar.bz2
markdown-rs-92b42e06f943338ce8b54b7e22cbb116ff598fa6.zip
Refactor to move token types to `token`
Diffstat (limited to '')
-rw-r--r--src/construct/label_start_link.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/construct/label_start_link.rs b/src/construct/label_start_link.rs
index 6c4d7ae..59729cc 100644
--- a/src/construct/label_start_link.rs
+++ b/src/construct/label_start_link.rs
@@ -15,8 +15,8 @@
//!
//! ## Tokens
//!
-//! * [`LabelLink`][TokenType::LabelLink]
-//! * [`LabelMarker`][TokenType::LabelMarker]
+//! * [`LabelLink`][Token::LabelLink]
+//! * [`LabelMarker`][Token::LabelMarker]
//!
//! ## References
//!
@@ -28,7 +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::tokenizer::{Code, LabelStart, State, StateFnResult, TokenType, Tokenizer};
+use crate::token::Token;
+use crate::tokenizer::{Code, LabelStart, State, StateFnResult, Tokenizer};
/// Start of label (link) start.
///
@@ -39,11 +40,11 @@ pub fn start(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {
match code {
Code::Char('[') => {
let start = tokenizer.events.len();
- tokenizer.enter(TokenType::LabelLink);
- tokenizer.enter(TokenType::LabelMarker);
+ tokenizer.enter(Token::LabelLink);
+ tokenizer.enter(Token::LabelMarker);
tokenizer.consume(code);
- tokenizer.exit(TokenType::LabelMarker);
- tokenizer.exit(TokenType::LabelLink);
+ tokenizer.exit(Token::LabelMarker);
+ tokenizer.exit(Token::LabelLink);
tokenizer.label_start_stack.push(LabelStart {
start: (start, tokenizer.events.len() - 1),
balanced: false,