diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-18 13:31:00 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-18 14:12:58 +0200 |
commit | af05141ad1a3850e273f2992fe3ceb85747f4d62 (patch) | |
tree | 1aa3581cc8eb568f8b6dc4389d2091a4866d7e37 /src/construct/partial_data.rs | |
parent | c9f75249b83839130ffbc3b6dd175b0e31008cb7 (diff) | |
download | markdown-rs-af05141ad1a3850e273f2992fe3ceb85747f4d62.tar.gz markdown-rs-af05141ad1a3850e273f2992fe3ceb85747f4d62.tar.bz2 markdown-rs-af05141ad1a3850e273f2992fe3ceb85747f4d62.zip |
Refactor to organize resolvers
Diffstat (limited to 'src/construct/partial_data.rs')
-rw-r--r-- | src/construct/partial_data.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/construct/partial_data.rs b/src/construct/partial_data.rs index b4dfda0..3bc8c1c 100644 --- a/src/construct/partial_data.rs +++ b/src/construct/partial_data.rs @@ -42,7 +42,7 @@ fn at_break(tokenizer: &mut Tokenizer, code: Code, stop: Vec<Code>) -> StateFnRe (State::Fn(Box::new(|t, c| at_break(t, c, stop))), None) } _ if stop.contains(&code) => { - tokenizer.register_resolver("data".to_string(), Box::new(resolve)); + tokenizer.register_resolver("data".to_string(), Box::new(resolve_data)); (State::Ok, Some(vec![code])) } _ => { @@ -75,7 +75,7 @@ fn data(tokenizer: &mut Tokenizer, code: Code, stop: Vec<Code>) -> StateFnResult } /// Merge adjacent data events. -pub fn resolve(tokenizer: &mut Tokenizer) -> Vec<Event> { +pub fn resolve_data(tokenizer: &mut Tokenizer) -> Vec<Event> { let mut edit_map = EditMap::new(); let len = tokenizer.events.len(); let mut index = 0; |