Skip to content
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 classes and IDs containing numbers #267

Open
lambda-fairy opened this issue Mar 21, 2021 · 0 comments
Open

Improve error message for classes and IDs containing numbers #267

lambda-fairy opened this issue Mar 21, 2021 · 0 comments

Comments

@lambda-fairy
Copy link
Owner

lambda-fairy commented Mar 21, 2021

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 {}
   |                    ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant