From c32240302d52a3af6929af7e7a60c7513e71c342 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 23 Aug 2024 11:26:25 -0500 Subject: [PATCH] fix(varcon): Swallow abbr annotations --- crates/varcon-core/src/parser.rs | 7 +++---- crates/varcon/src/codegen.rs | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/crates/varcon-core/src/parser.rs b/crates/varcon-core/src/parser.rs index 8a12a78..e82771f 100644 --- a/crates/varcon-core/src/parser.rs +++ b/crates/varcon-core/src/parser.rs @@ -992,7 +992,8 @@ impl Entry { fn parse_description(input: &mut &str) -> PResult { trace("description", move |input: &mut &str| { - let (_plural, pos, archaic, note, description) = ( + let (_abbr, _plural, pos, archaic, note, description) = ( + winnow::combinator::opt((winnow::ascii::space1, "")), winnow::combinator::opt((winnow::ascii::space1, "")), winnow::combinator::opt((winnow::ascii::space1, delimited('<', Pos::parse_, '>'))), winnow::combinator::opt((winnow::ascii::space1, "(-)")), @@ -1386,9 +1387,7 @@ Entry { pos: None, archaic: false, note: false, - description: Some( - "", - ), + description: None, comment: None, } diff --git a/crates/varcon/src/codegen.rs b/crates/varcon/src/codegen.rs index 7ac57a4..7c8a19d 100644 --- a/crates/varcon/src/codegen.rs +++ b/crates/varcon/src/codegen.rs @@ -164634,7 +164634,7 @@ Cluster { }, ], pos: None, archaic: false, note: false, - description: Some(""), + description: None, comment: None, }, ], @@ -227280,7 +227280,7 @@ Cluster { }, ], pos: None, archaic: false, note: false, - description: Some(" Matthew"), + description: Some("Matthew"), comment: None, }, ], @@ -265098,7 +265098,7 @@ Cluster { }, ], pos: None, archaic: false, note: false, - description: Some(" Oklahoma"), + description: Some("Oklahoma"), comment: None, }, ],