Compare plain list item bullets.

This commit is contained in:
Tom Alexander
2023-09-29 17:28:50 -04:00
parent 13697df7ea
commit 967e74c147
4 changed files with 53 additions and 17 deletions

View File

@@ -78,6 +78,12 @@ impl<'s> OrgSource<'s> {
self.slice(..(other.start - self.start))
}
pub(crate) fn get_until_end_of(&self, other: OrgSource<'s>) -> OrgSource<'s> {
debug_assert!(other.start >= self.start);
debug_assert!(other.end <= self.end);
self.slice(..(other.end - self.start))
}
pub(crate) fn get_start_of_line(&self) -> OrgSource<'s> {
let skipped_text = self.text_since_line_break();
let mut bracket_depth = self.bracket_depth;