Introduce the tab_width setting and give tabs a greater value when counting indentation level.

This commit is contained in:
Tom Alexander
2023-09-15 21:52:42 -04:00
parent c9ce32c881
commit d443dbd468
5 changed files with 44 additions and 12 deletions

View File

@@ -10,10 +10,13 @@ pub struct PlainList<'s> {
pub children: Vec<PlainListItem<'s>>,
}
/// The width that something is indented. For example, a single tab character could be a value of 4 or 8.
pub type IndentationLevel = u16;
#[derive(Debug)]
pub struct PlainListItem<'s> {
pub source: &'s str,
pub indentation: usize,
pub indentation: IndentationLevel,
pub bullet: &'s str,
pub checkbox: Option<(CheckboxType, &'s str)>,
pub tag: Vec<Object<'s>>,

View File

@@ -16,6 +16,7 @@ pub use greater_element::Drawer;
pub use greater_element::DynamicBlock;
pub use greater_element::FootnoteDefinition;
pub use greater_element::GreaterBlock;
pub use greater_element::IndentationLevel;
pub use greater_element::NodeProperty;
pub use greater_element::PlainList;
pub use greater_element::PlainListItem;