Feat: reject invalid keys
This commit is contained in:
6 files changed
+40
-23
No files matched your search
@@ -169,7 +169,13 @@ impl Parse for Element {
|
||||
},
|
||||
}));
|
||||
} else if name_str == "key" {
|
||||
key = Some(content.parse()?);
|
||||
let _key: IfmtInput = content.parse()?;
|
||||
|
||||
if _key.is_static() {
|
||||
invalid_key!(_key);
|
||||
}
|
||||
|
||||
key = Some(_key);
|
||||
} else {
|
||||
let value = content.parse::<ElementAttrValue>()?;
|
||||
attributes.push(attribute::AttributeType::Named(ElementAttrNamed {
|
||||
|
||||
Reference in new issue
Block a user