aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/list.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/construct/list.rs')
-rw-r--r--src/construct/list.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/construct/list.rs b/src/construct/list.rs
index 48ed291..12c666b 100644
--- a/src/construct/list.rs
+++ b/src/construct/list.rs
@@ -390,8 +390,7 @@ fn nok(_tokenizer: &mut Tokenizer, _code: Code) -> StateFnResult {
}
/// Find adjacent list items with the same marker.
-pub fn resolve_list_item(tokenizer: &mut Tokenizer) {
- let mut edit_map = EditMap::new();
+pub fn resolve_list_item(tokenizer: &mut Tokenizer, map: &mut EditMap) -> bool {
let mut index = 0;
let mut balance = 0;
let mut lists_wip: Vec<(Kind, usize, usize, usize)> = vec![];
@@ -486,11 +485,12 @@ pub fn resolve_list_item(tokenizer: &mut Tokenizer) {
list_start.token_type = token_type.clone();
list_end.token_type = token_type;
- edit_map.add(list_item.2, 0, vec![list_start]);
- edit_map.add(list_item.3 + 1, 0, vec![list_end]);
+ map.add(list_item.2, 0, vec![list_start]);
+ map.add(list_item.3 + 1, 0, vec![list_end]);
index += 1;
}
- edit_map.consume(&mut tokenizer.events);
+ // This resolver improves events, but is not needed by other resolvers.
+ false
}