diff --git a/src/parser/element_parser.rs b/src/parser/element_parser.rs index 92da53c..e847da5 100644 --- a/src/parser/element_parser.rs +++ b/src/parser/element_parser.rs @@ -107,6 +107,7 @@ fn _element<'b, 'g, 'r, 's>( match map(paragraph_matcher, Element::Paragraph)(remaining) { the_ok @ Ok(_) => the_ok, Err(_) => { + // TODO: Because this function expects a single element, if there are multiple affiliated keywords before an element that cannot have affiliated keywords, we end up re-parsing the affiliated keywords many times. affiliated_keywords.clear(); map(affiliated_keyword_matcher, Element::Keyword)(input) }