From ab09edb5de8da73a6890d119800166773c4abd17 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 25 Mar 2023 13:16:28 -0400 Subject: [PATCH] Initial structures for plain lists. --- src/parser/greater_element.rs | 10 ++++++++++ src/parser/mod.rs | 1 + src/parser/plain_list.rs | 1 + 3 files changed, 12 insertions(+) create mode 100644 src/parser/plain_list.rs diff --git a/src/parser/greater_element.rs b/src/parser/greater_element.rs index 38d2a7a4..51fbf5da 100644 --- a/src/parser/greater_element.rs +++ b/src/parser/greater_element.rs @@ -1,4 +1,14 @@ +use super::element::Element; + #[derive(Debug)] pub struct PlainList<'s> { pub source: &'s str, + pub children: Vec>, +} + +#[derive(Debug)] +pub struct PlainListItem<'s> { + pub source: &'s str, + pub bullet: &'s str, + pub contents: Vec>, } diff --git a/src/parser/mod.rs b/src/parser/mod.rs index ca10ae3f..bb384e4e 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -9,6 +9,7 @@ mod object; mod paragraph; mod parser_context; mod parser_with_context; +mod plain_list; mod plain_text; mod source; mod util; diff --git a/src/parser/plain_list.rs b/src/parser/plain_list.rs new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/src/parser/plain_list.rs @@ -0,0 +1 @@ +