diff --git a/src/parser/plain_list.rs b/src/parser/plain_list.rs index 5bf1171..62a6263 100644 --- a/src/parser/plain_list.rs +++ b/src/parser/plain_list.rs @@ -159,11 +159,13 @@ pub(crate) fn plain_list<'b, 'g, 'r, 's>( let (remaining, _trailing_ws) = maybe_consume_trailing_whitespace_if_not_exiting(context, remaining)?; let source = get_consumed(input, remaining); + let name = get_name(&affiliated_keywords); Ok(( remaining, PlainList { source: source.into(), - name: get_name(&affiliated_keywords), + affiliated_keywords, + name, list_type: first_item_list_type.expect("Plain lists require at least one element."), children: children.into_iter().map(|(_start, item)| item).collect(), }, diff --git a/src/types/greater_element.rs b/src/types/greater_element.rs index 7f2bede..d2aeab4 100644 --- a/src/types/greater_element.rs +++ b/src/types/greater_element.rs @@ -7,6 +7,7 @@ use super::StandardProperties; #[derive(Debug)] pub struct PlainList<'s> { pub source: &'s str, + pub affiliated_keywords: Vec>, pub name: Option<&'s str>, pub list_type: PlainListType, pub children: Vec>,