lambda-fairy / maud

:pencil: Compile-time HTML templates for Rust
https://maud.lambda.xyz
Apache License 2.0
2.09k stars 137 forks source link

Error with attributes formatted like `abc-123` #384

Closed spiffytech closed 8 months ago

spiffytech commented 1 year ago

When an attribute has a hyphen followed by a number, Maud mistakes the attribute for an element body and will not compile it:

div abc-123="";

literal must be double-quoted: `"123"`
element body must be wrapped in braces

  = help: see https://github.com/lambda-fairy/maud/pull/137 for details

This prevents the use of the HTMX response-targets extension, which embeds HTTP status codes in element attributes.

lambda-fairy commented 8 months ago

Fixed in HEAD, thanks!