Add a TODO for a performance optimization.
This commit is contained in:
parent
0b2a5f4fbf
commit
f9460b88d7
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user