aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/label_end.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-21 15:32:48 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-21 15:32:53 +0200
commit2d0dfe66d423e707b7de60d9bde0cec7933580fe (patch)
treeddbe9729046c740b07e656920fa991c475983046 /src/construct/label_end.rs
parent75c2109c6051009b220436bd823970a374f4f9fd (diff)
downloadmarkdown-rs-2d0dfe66d423e707b7de60d9bde0cec7933580fe.tar.gz
markdown-rs-2d0dfe66d423e707b7de60d9bde0cec7933580fe.tar.bz2
markdown-rs-2d0dfe66d423e707b7de60d9bde0cec7933580fe.zip
Refactor to move some event fields to `link`
Diffstat (limited to 'src/construct/label_end.rs')
-rw-r--r--src/construct/label_end.rs32
1 files changed, 8 insertions, 24 deletions
diff --git a/src/construct/label_end.rs b/src/construct/label_end.rs
index bcfe343..883e314 100644
--- a/src/construct/label_end.rs
+++ b/src/construct/label_end.rs
@@ -636,18 +636,14 @@ pub fn resolve_media(tokenizer: &mut Tokenizer, map: &mut EditMap) -> bool {
token_type: Token::Data,
point: events[data_enter_index].point.clone(),
index: events[data_enter_index].index,
- previous: None,
- next: None,
- content_type: None,
+ link: None,
},
Event {
event_type: EventType::Exit,
token_type: Token::Data,
point: events[data_exit_index].point.clone(),
index: events[data_exit_index].index,
- previous: None,
- next: None,
- content_type: None,
+ link: None,
},
],
);
@@ -690,18 +686,14 @@ pub fn resolve_media(tokenizer: &mut Tokenizer, map: &mut EditMap) -> bool {
},
point: group_enter_event.point.clone(),
index: group_enter_event.index,
- previous: None,
- next: None,
- content_type: None,
+ link: None,
},
Event {
event_type: EventType::Enter,
token_type: Token::Label,
point: group_enter_event.point.clone(),
index: group_enter_event.index,
- previous: None,
- next: None,
- content_type: None,
+ link: None,
},
],
);
@@ -717,9 +709,7 @@ pub fn resolve_media(tokenizer: &mut Tokenizer, map: &mut EditMap) -> bool {
token_type: Token::LabelText,
point: events[text_enter_index].point.clone(),
index: events[text_enter_index].index,
- previous: None,
- next: None,
- content_type: None,
+ link: None,
}],
);
@@ -732,9 +722,7 @@ pub fn resolve_media(tokenizer: &mut Tokenizer, map: &mut EditMap) -> bool {
token_type: Token::LabelText,
point: events[text_exit_index].point.clone(),
index: events[text_exit_index].index,
- previous: None,
- next: None,
- content_type: None,
+ link: None,
}],
);
}
@@ -748,9 +736,7 @@ pub fn resolve_media(tokenizer: &mut Tokenizer, map: &mut EditMap) -> bool {
token_type: Token::Label,
point: events[label_exit_index].point.clone(),
index: events[label_exit_index].index,
- previous: None,
- next: None,
- content_type: None,
+ link: None,
}],
);
@@ -763,9 +749,7 @@ pub fn resolve_media(tokenizer: &mut Tokenizer, map: &mut EditMap) -> bool {
token_type: Token::Link,
point: events[group_end_index].point.clone(),
index: events[group_end_index].index,
- previous: None,
- next: None,
- content_type: None,
+ link: None,
}],
);