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/attention.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/attention.rs')
-rw-r--r-- | src/construct/attention.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/construct/attention.rs b/src/construct/attention.rs index e1fa82f..86c9249 100644 --- a/src/construct/attention.rs +++ b/src/construct/attention.rs @@ -197,7 +197,7 @@ fn inside(tokenizer: &mut Tokenizer, code: Code, marker: MarkerKind) -> StateFnR } _ => { tokenizer.exit(Token::AttentionSequence); - tokenizer.register_resolver("attention".to_string(), Box::new(resolve)); + tokenizer.register_resolver("attention".to_string(), Box::new(resolve_attention)); (State::Ok, Some(vec![code])) } } @@ -205,7 +205,7 @@ fn inside(tokenizer: &mut Tokenizer, code: Code, marker: MarkerKind) -> StateFnR /// Resolve attention sequences. #[allow(clippy::too_many_lines)] -fn resolve(tokenizer: &mut Tokenizer) -> Vec<Event> { +fn resolve_attention(tokenizer: &mut Tokenizer) -> Vec<Event> { let codes = &tokenizer.parse_state.codes; let mut edit_map = EditMap::new(); let mut start = 0; |