aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/label_start_image.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2023-05-23 16:31:21 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2023-05-23 16:31:21 +0200
commit0be7464edbd0fae379eff1e18d64bd2099651040 (patch)
tree5511818733bfa40d9b22b09bfc10c5be2c788988 /src/construct/label_start_image.rs
parent35cbee9ede93fbf9296357765cab0e23698bfb22 (diff)
downloadmarkdown-rs-0be7464edbd0fae379eff1e18d64bd2099651040.tar.gz
markdown-rs-0be7464edbd0fae379eff1e18d64bd2099651040.tar.bz2
markdown-rs-0be7464edbd0fae379eff1e18d64bd2099651040.zip
Refactor some code
Diffstat (limited to '')
-rw-r--r--src/construct/label_start_image.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/construct/label_start_image.rs b/src/construct/label_start_image.rs
index 4511794..784c264 100644
--- a/src/construct/label_start_image.rs
+++ b/src/construct/label_start_image.rs
@@ -68,6 +68,7 @@ pub fn open(tokenizer: &mut Tokenizer) -> State {
tokenizer.enter(Name::LabelMarker);
tokenizer.consume();
tokenizer.exit(Name::LabelMarker);
+ tokenizer.exit(Name::LabelImage);
State::Next(StateName::LabelStartImageAfter)
}
_ => State::Nok,
@@ -107,7 +108,6 @@ pub fn after(tokenizer: &mut Tokenizer) -> State {
{
State::Nok
} else {
- tokenizer.exit(Name::LabelImage);
tokenizer.tokenize_state.label_starts.push(LabelStart {
kind: LabelKind::Image,
start: (tokenizer.events.len() - 6, tokenizer.events.len() - 1),