I need to parse the affiliated keywords during parsing because it relies on the global settings.

This commit is contained in:
Tom Alexander
2023-10-11 11:31:20 -04:00
parent c0e462944d
commit a5129199c7
5 changed files with 48 additions and 2 deletions

View File

@@ -18,6 +18,7 @@ use nom::multi::many1;
use nom::multi::many_till;
use nom::sequence::tuple;
use super::affiliated_keyword::parse_affiliated_keywords;
use super::element_parser::element;
use super::keyword::affiliated_keyword;
use super::object_parser::standard_set_object;
@@ -164,7 +165,10 @@ pub(crate) fn plain_list<'b, 'g, 'r, 's>(
remaining,
PlainList {
source: source.into(),
affiliated_keywords,
affiliated_keywords: parse_affiliated_keywords(
context.get_global_settings(),
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(),