Fix handling of property drawers containing only whitespace.

This commit is contained in:
Tom Alexander
2023-12-15 14:49:28 -05:00
parent 6ce25c8a3b
commit 7430daa768
4 changed files with 103 additions and 21 deletions

View File

@@ -78,7 +78,11 @@ pub(crate) fn property_drawer<'b, 'g, 'r, 's>(
PropertyDrawer {
source: source.into(),
children,
contents: Some(contents.into()),
contents: if contents.len() > 0 {
Some(contents.into())
} else {
None
},
post_blank: post_blank.map(Into::<&str>::into),
},
))