-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error message for invalid attribute values #208
Comments
Actually, while |
Ah, that's interesting. I'm still against allowing that, though, as it means that factoring out a variable can change the result: html! { 0x2a } // "0x2a"
let ponk = 0x2a;
html! { (ponk) } // "42" |
But |
To clarify, I mean that so far it's been true that adding parentheses html! { "ponk" } // "ponk"
html! { ("ponk") } // "ponk" But allowing bare number literals will break this property: html! { 0x2a } // "0x2a"
html! { (0x2a) } // "42" |
#265 improves the error message for non-string literals in element bodies and attribute values. But it doesn't handle the class/ID shorthand case ( |
Currently, when the user types in:
or
or
they get the error "expected string". This is technically correct but I think we can do better.
=true
bit altogether.The text was updated successfully, but these errors were encountered: