From e6e3783ec65b7bcc872c00aaaef02185eac74e17 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Thu, 12 Oct 2023 17:23:54 -0400 Subject: [PATCH] Support parsing affiliated keywords as keywords. --- src/parser/element_parser.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/parser/element_parser.rs b/src/parser/element_parser.rs index 3535b0c..92b1089 100644 --- a/src/parser/element_parser.rs +++ b/src/parser/element_parser.rs @@ -209,6 +209,7 @@ fn _element<'b, 'g, 'r, 's>( Element::BabelCall ); + // Keyword with affiliated keywords ak_element!( keyword, &mut affiliated_keywords, @@ -218,6 +219,16 @@ fn _element<'b, 'g, 'r, 's>( Element::Keyword ); + // Keyword without affiliated keywords + ak_element!( + keyword, + std::iter::empty(), + input, + context, + input, + Element::Keyword + ); + if can_be_paragraph { // Paragraph with affiliated keyword ak_element!(