diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-08-11 15:23:45 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-08-11 15:23:45 +0200 |
commit | cf9f0039911597cd5c9bc8e98f61b5df09b02130 (patch) | |
tree | 43fcec13b338fd64b800df1f72c8cec01adc8581 /src/construct/list.rs | |
parent | d87dc75500a2e73d9521135054b42c18e6eae987 (diff) | |
download | markdown-rs-cf9f0039911597cd5c9bc8e98f61b5df09b02130.tar.gz markdown-rs-cf9f0039911597cd5c9bc8e98f61b5df09b02130.tar.bz2 markdown-rs-cf9f0039911597cd5c9bc8e98f61b5df09b02130.zip |
Remove boxes around resolvers
Diffstat (limited to 'src/construct/list.rs')
-rw-r--r-- | src/construct/list.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/construct/list.rs b/src/construct/list.rs index ded77d0..028e283 100644 --- a/src/construct/list.rs +++ b/src/construct/list.rs @@ -47,6 +47,7 @@ use crate::constant::{LIST_ITEM_VALUE_SIZE_MAX, TAB_SIZE}; use crate::construct::partial_space_or_tab::space_or_tab_min_max; use crate::event::{Kind, Name}; +use crate::resolve::Name as ResolveName; use crate::state::{Name as StateName, State}; use crate::tokenizer::Tokenizer; use crate::util::{ @@ -283,7 +284,7 @@ pub fn after(tokenizer: &mut Tokenizer) -> State { container.size = prefix; tokenizer.exit(Name::ListItemPrefix); - tokenizer.register_resolver_before("list_item".to_string(), Box::new(resolve_list_item)); + tokenizer.register_resolver_before(ResolveName::List); State::Ok } } @@ -355,7 +356,7 @@ pub fn nok(_tokenizer: &mut Tokenizer) -> State { } /// Find adjacent list items with the same marker. -pub fn resolve_list_item(tokenizer: &mut Tokenizer) { +pub fn resolve(tokenizer: &mut Tokenizer) { let mut lists_wip: Vec<(u8, usize, usize, usize)> = vec![]; let mut lists: Vec<(u8, usize, usize, usize)> = vec![]; let mut index = 0; |