aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/label_end.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-11 15:23:45 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-11 15:23:45 +0200
commitcf9f0039911597cd5c9bc8e98f61b5df09b02130 (patch)
tree43fcec13b338fd64b800df1f72c8cec01adc8581 /src/construct/label_end.rs
parentd87dc75500a2e73d9521135054b42c18e6eae987 (diff)
downloadmarkdown-rs-cf9f0039911597cd5c9bc8e98f61b5df09b02130.tar.gz
markdown-rs-cf9f0039911597cd5c9bc8e98f61b5df09b02130.tar.bz2
markdown-rs-cf9f0039911597cd5c9bc8e98f61b5df09b02130.zip
Remove boxes around resolvers
Diffstat (limited to '')
-rw-r--r--src/construct/label_end.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/construct/label_end.rs b/src/construct/label_end.rs
index 61f378d..f27d79f 100644
--- a/src/construct/label_end.rs
+++ b/src/construct/label_end.rs
@@ -149,9 +149,9 @@
use crate::constant::RESOURCE_DESTINATION_BALANCE_MAX;
use crate::construct::partial_space_or_tab::space_or_tab_eol;
use crate::event::{Event, Kind, Name};
+use crate::resolve::Name as ResolveName;
use crate::state::{Name as StateName, State};
use crate::tokenizer::{Media, Tokenizer};
-
use crate::util::{
normalize_identifier::normalize_identifier,
skip,
@@ -331,7 +331,7 @@ pub fn ok(tokenizer: &mut Tokenizer) -> State {
});
tokenizer.tokenize_state.start = 0;
tokenizer.tokenize_state.end = 0;
- tokenizer.register_resolver_before("media".to_string(), Box::new(resolve_media));
+ tokenizer.register_resolver_before(ResolveName::Label);
State::Ok
}
@@ -614,7 +614,7 @@ pub fn reference_collapsed_open(tokenizer: &mut Tokenizer) -> State {
/// This turns correct label start (image, link) and label end into links and
/// images, or turns them back into data.
#[allow(clippy::too_many_lines)]
-pub fn resolve_media(tokenizer: &mut Tokenizer) {
+pub fn resolve(tokenizer: &mut Tokenizer) {
let mut left = tokenizer.tokenize_state.label_start_list_loose.split_off(0);
let mut left_2 = tokenizer.tokenize_state.label_start_stack.split_off(0);
let media = tokenizer.tokenize_state.media_list.split_off(0);