fix tests around children elements

This commit is contained in:
Jonathan Kelley committed 2024-01-10 23:42:36 -08:00
1 parent b8061d6d14
commit 8a77d2560e
4 files changed
+26 -8

No files matched your search

+6
View File
@@ -137,6 +137,12 @@ impl Parse for Element {
{
let name = content.parse::<Ident>()?;
let name_ = name.clone();
// If the shorthand field is children, these are actually children!
if name == "children" {
panic!("children must be wrapped in braces");
};
let value = ElementAttrValue::Shorthand(name.clone());
attributes.push(attribute::AttributeType::Named(ElementAttrNamed {
el_name: el_name.clone(),