aboutsummaryrefslogtreecommitdiffstats
path: root/src/content/flow.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-06-14 13:47:32 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-06-14 13:55:03 +0200
commita1ce43e428754084474a7ecf88ae6debf88b9164 (patch)
treea1df0ec515f624431d3e398f7d24e7b411c18e6e /src/content/flow.rs
parentc587aee9512119e61918bfbe81c3cca3de7e70aa (diff)
downloadmarkdown-rs-a1ce43e428754084474a7ecf88ae6debf88b9164.tar.gz
markdown-rs-a1ce43e428754084474a7ecf88ae6debf88b9164.tar.bz2
markdown-rs-a1ce43e428754084474a7ecf88ae6debf88b9164.zip
Reorganize to split util
Diffstat (limited to 'src/content/flow.rs')
-rw-r--r--src/content/flow.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/content/flow.rs b/src/content/flow.rs
index 6fa8c25..4d2ece1 100644
--- a/src/content/flow.rs
+++ b/src/content/flow.rs
@@ -28,7 +28,7 @@ use crate::construct::{
};
use crate::subtokenize::subtokenize;
use crate::tokenizer::{Code, Event, Point, State, StateFnResult, TokenType, Tokenizer};
-use crate::util::get_span;
+use crate::util::span::from_exit_event;
/// Turn `codes` as the flow content type into events.
pub fn flow(codes: &[Code], point: Point, index: usize) -> Vec<Event> {
@@ -240,7 +240,7 @@ fn continuation_construct_after_prefix(tokenizer: &mut Tokenizer, code: Code) ->
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;
}
}