diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-06-14 13:47:32 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-06-14 13:55:03 +0200 |
commit | a1ce43e428754084474a7ecf88ae6debf88b9164 (patch) | |
tree | a1df0ec515f624431d3e398f7d24e7b411c18e6e /src/construct/code_fenced.rs | |
parent | c587aee9512119e61918bfbe81c3cca3de7e70aa (diff) | |
download | markdown-rs-a1ce43e428754084474a7ecf88ae6debf88b9164.tar.gz markdown-rs-a1ce43e428754084474a7ecf88ae6debf88b9164.tar.bz2 markdown-rs-a1ce43e428754084474a7ecf88ae6debf88b9164.zip |
Reorganize to split util
Diffstat (limited to 'src/construct/code_fenced.rs')
-rw-r--r-- | src/construct/code_fenced.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/construct/code_fenced.rs b/src/construct/code_fenced.rs index a440d40..c852e8d 100644 --- a/src/construct/code_fenced.rs +++ b/src/construct/code_fenced.rs @@ -91,7 +91,7 @@ use crate::constant::{CODE_FENCED_SEQUENCE_SIZE_MIN, TAB_SIZE}; use crate::construct::partial_whitespace::start as whitespace; use crate::tokenizer::{Code, State, StateFnResult, TokenType, Tokenizer}; -use crate::util::get_span; +use crate::util::span::from_exit_event; /// Kind of fences. #[derive(Debug, Clone, PartialEq)] @@ -147,7 +147,7 @@ fn before_sequence_open(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult if let Some(event) = tail { if event.token_type == TokenType::Whitespace { - let span = get_span(&tokenizer.events, tokenizer.events.len() - 1); + let span = from_exit_event(&tokenizer.events, tokenizer.events.len() - 1); prefix = span.end_index - span.start_index; } } @@ -415,7 +415,7 @@ fn close_sequence_before(tokenizer: &mut Tokenizer, info: Info, code: Code) -> S if let Some(event) = tail { if event.token_type == TokenType::Whitespace { - let span = get_span(&tokenizer.events, tokenizer.events.len() - 1); + let span = from_exit_event(&tokenizer.events, tokenizer.events.len() - 1); prefix = span.end_index - span.start_index; } } |