maud
maud copied to clipboard
Improve error message for classes and IDs containing numbers
Follow-up to #208.
This code:
html! {
div.col-sm-2 {}
}
leads to this error:
error: literal must be double-quoted: `"2"`
--> $DIR/non-string-literal.rs:15:20
|
15 | div.col-sm-2 {}
| ^
error: element body must be wrapped in braces
--> $DIR/non-string-literal.rs:15:20
|
15 | div.col-sm-2 {}
| ^
|
= help: see https://github.com/lambda-fairy/maud/pull/137 for details
Ideally it should say something like this:
error: classes with special characters must be double-quoted: `."col-sm-2"`
--> $DIR/non-string-literal.rs:15:20
|
15 | div.col-sm-2 {}
| ^