web-mode
web-mode copied to clipboard
Issue with unquoted HTML attribute values defined in another language
Theory
HTML unquoted attribute values defined in a non-HTML language are not considered as valid attribute values. Therefore the HTML parser expects next string to define the attribute value.
Consequences
It produces both syntax highlighting issue and indentation issue, at least with ERB and HBS templates, but I'm pretty sure this appears with every language combined with HTML.
Example
In the examples above, bar="baz"
has 2 problems :
- Highlighting issue : the face used is
face(web-mode-html-attr-value-face)
- Indentation issue : it should start at the same indentation as
foo
Related specs :
Related issues :
- #1150
- #1136
please post the examples on gist
ERB : https://gist.github.com/lcoq/57e3dafe3519a1ee145fabdf57ecf90f HBS : https://gist.github.com/lcoq/647b0f89219404518425d0bb3e2cb4c9
I've pushed a fix