-
Notifications
You must be signed in to change notification settings - Fork 919
lang="" on a html tag breaks compilation in v16 #1726
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
Comments
Agreed that it should not break, but it should give a warning, according to the Mozilla developer docs:
|
We specify |
If you don't know the language of the content, don't give the attribute defining the language, it's not a required tag. |
It sort of is because we also have a That's besides the point, vue (loader?) should not break on it, as it worked before. |
Just backing up your point for unsetting it:
And yes, it shouldn't break it, it should just give an optional warning that should default to true in regards to it. The reason I am adding this info is that there is always a good argument to make to have warnings for things that are bad practice, so when fixing where it's breaking, handle it to throw a warning based on the config toggle (though it should rather be part of your linter then). |
Why a warning? It is a valid, as your own link to the spec indicates. Nor is it loader's job to validate html attributes. |
I'm no longer able to reproduce this issue in a fresh project with the latest version. So I presume this has been resolved. If you still encounter similar problems, please open a new issue with a reference to this one and a minimal reproduction. |
I still can't build my project using [email protected]. The repro example in inital issue still applies. |
Version
16.0.0-beta.7
[email protected]
Reproduction link
https://github.com/thelounge/thelounge/blob/d7aaf91f31a6c7bbb714f0bfe5e701f718b9e19c/client/components/Chat.vue#L2
Steps to reproduce
What is expected?
Compiles fine.
What is actually happening?
We have a lang="" on a div tag (which is valid according to html spec) and it produces VueCompilerError: Invalid end tag. on multiple closing tags, and removing or renaming lang attribute makes it work fine.
I tried to repro in jsfiddle and in vue compiler explorer, both of these worked, so I am assuming the issue lies in vue-loader.
I am guessing its trying to parse lang attribute as if it was on root template or script.
The text was updated successfully, but these errors were encountered: