From 05187c9343768af4bdd691cd456344a2dd346685 Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Sun, 16 Aug 2026 17:03:08 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(macros):=20Evita=20duplicar=20spli?= =?UTF-8?q?ces=20de=20attr=20en=20html!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helpers/pagetop-macros/src/maud/ast.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); }