From b82d4c0eca307060f681e37ed746838784797a48 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Wed, 4 Oct 2023 21:32:10 -0400 Subject: [PATCH] Fix finding name keyword in affiliated keywords list. --- src/parser/util.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/parser/util.rs b/src/parser/util.rs index 8f63eaf..a36c53a 100644 --- a/src/parser/util.rs +++ b/src/parser/util.rs @@ -280,10 +280,7 @@ pub(crate) fn indentation_level<'b, 'g, 'r, 's>( pub(crate) fn get_name<'s>(affiliated_keywords: &Vec>) -> Option<&'s str> { let name_keyword = affiliated_keywords .iter() - .filter(|kw| match kw.name { - Some(name) if name.eq_ignore_ascii_case("name") => true, - _ => false, - }) + .filter(|kw| kw.key.eq_ignore_ascii_case("name")) .last(); name_keyword.map(|kw| kw.value) }