aboutsummaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-01 11:01:00 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-01 11:01:00 +0200
commite97ad954e1468b90722cf91996d7dfc069fedf78 (patch)
treee4a03d0e2a510738fe6cb46b4678d59d485c7a4b /src/util
parent65f51b446cfe1fe4da9143bfe5d71ad56e051dd6 (diff)
downloadmarkdown-rs-e97ad954e1468b90722cf91996d7dfc069fedf78.tar.gz
markdown-rs-e97ad954e1468b90722cf91996d7dfc069fedf78.tar.bz2
markdown-rs-e97ad954e1468b90722cf91996d7dfc069fedf78.zip
Refactor to pass more `&str`s, work on more bytes
Diffstat (limited to 'src/util')
-rw-r--r--src/util/slice.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/slice.rs b/src/util/slice.rs
index d899dac..13b664d 100644
--- a/src/util/slice.rs
+++ b/src/util/slice.rs
@@ -42,6 +42,11 @@ impl<'a> Position<'a> {
enter_index -= 1;
}
}
+
+ /// To do.
+ pub fn to_indices(&self) -> (usize, usize) {
+ (self.start.index, self.end.index)
+ }
}
/// Chars belonging to a range.