Closed mekanoe closed 1 year ago
Switches view! AttributeName parser to Ident::parse_any to handle keywords in extended attribute names.
view!
Ident::parse_any
fixes #620
view! { cx, p(class="my-class", data-ref-me="my-value") }
Prior to change, this would throw with
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ error: expected identifier, found keyword `ref` --> tests/view/element-pass.rs:26:63 | 26 | let _: View<G> = view! { cx, p(class="my-class", data-ref-me="my-value") }; | ^^^ ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
Switches
view!
AttributeName parser toIdent::parse_any
to handle keywords in extended attribute names.fixes #620
Example
Prior to change, this would throw with