Allow affiliating keywords with regular keywords.

This commit is contained in:
Tom Alexander
2023-08-29 17:19:13 -04:00
parent e3d38cfbe2
commit 1bcd1895c0
3 changed files with 15 additions and 6 deletions

View File

@@ -87,6 +87,7 @@ fn _element<'r, 's>(
map(fixed_width_area_matcher, Element::FixedWidthArea),
map(horizontal_rule_matcher, Element::HorizontalRule),
map(latex_environment_matcher, Element::LatexEnvironment),
map(keyword_matcher, Element::Keyword),
))(remaining)
{
the_ok @ Ok(_) => the_ok,
@@ -96,12 +97,12 @@ fn _element<'r, 's>(
the_ok @ Ok(_) => the_ok,
Err(_) => {
affiliated_keywords.clear();
map(keyword_matcher, Element::Keyword)(input)
map(affiliated_keyword_matcher, Element::Keyword)(input)
}
}
} else {
affiliated_keywords.clear();
map(keyword_matcher, Element::Keyword)(input)
map(affiliated_keyword_matcher, Element::Keyword)(input)
}
}
}?;