diff --git a/helpers/pagetop-macros/src/maud/ast.rs b/helpers/pagetop-macros/src/maud/ast.rs index c8309ef5..0b36d64b 100644 --- a/helpers/pagetop-macros/src/maud/ast.rs +++ b/helpers/pagetop-macros/src/maud/ast.rs @@ -206,6 +206,7 @@ impl DiagnosticParse for Element { }, attrs: { let mut id_pushed = false; + let mut splice_pushed = false; let mut attrs = Vec::new(); while input.peek(Ident::peek_any) @@ -226,6 +227,16 @@ impl DiagnosticParse for Element { id_pushed = true; } + if let Attribute::Splice { .. } = attr { + if splice_pushed { + return Err(Error::new_spanned( + attr, + "only one spliced attribute value is allowed per element", + )); + } + splice_pushed = true; + } + attrs.push(attr); }