aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/heading_setext.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/construct/heading_setext.rs')
-rw-r--r--src/construct/heading_setext.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/construct/heading_setext.rs b/src/construct/heading_setext.rs
index 828b7f4..7aa0054 100644
--- a/src/construct/heading_setext.rs
+++ b/src/construct/heading_setext.rs
@@ -61,7 +61,7 @@ use crate::constant::TAB_SIZE;
use crate::construct::partial_space_or_tab::{space_or_tab, space_or_tab_min_max};
use crate::token::Token;
use crate::tokenizer::{Code, EventType, State, Tokenizer};
-use crate::util::{edit_map::EditMap, skip::opt_back as skip_opt_back};
+use crate::util::skip::opt_back as skip_opt_back;
/// Kind of underline.
#[derive(Debug, Clone, PartialEq)]
@@ -196,7 +196,7 @@ fn after(tokenizer: &mut Tokenizer, code: Code) -> State {
}
/// Resolve heading (setext).
-pub fn resolve(tokenizer: &mut Tokenizer, map: &mut EditMap) -> bool {
+pub fn resolve(tokenizer: &mut Tokenizer) {
let mut index = 0;
let mut paragraph_enter = None;
let mut paragraph_exit = None;
@@ -228,13 +228,10 @@ pub fn resolve(tokenizer: &mut Tokenizer, map: &mut EditMap) -> bool {
let mut heading_exit = tokenizer.events[index].clone();
heading_exit.token_type = Token::HeadingSetext;
- map.add(enter, 0, vec![heading_enter]);
- map.add(index + 1, 0, vec![heading_exit]);
+ tokenizer.map.add(enter, 0, vec![heading_enter]);
+ tokenizer.map.add(index + 1, 0, vec![heading_exit]);
}
index += 1;
}
-
- // This resolver improves events, but is not needed by other resolvers.
- false
}