You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I want to try fixing #7756, but the fix needs an answer to a question: do we cross-compile between HTML versions, or is HTML5 a safe bet? Only with HTML5 (I believe) do you get the support for attributes without values, which is basically what the issue has a problem with.
The actual problem is that pug is assuming not HTML5, and mirroring attributes like you used to "have to do" (to be technically correct). The fix I'm proposing would be to special case the template type in the Vue transformer, and pass in a manual HTML5 doctype if it detects that you are using pug (so as to not pollute the local space when using other engines). However, this means that for Vue pug templates, you would be locked in to HTML5 by default.
Aside: ok, so I thought this was more drastic than it actually was. You can still override the doctype from the pug template and manually break this example, but only because the example expects HTML5 (I tested by forcing HTML4 on the document), so I will probably go ahead and make the PR.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
So I want to try fixing #7756, but the fix needs an answer to a question: do we cross-compile between HTML versions, or is HTML5 a safe bet? Only with HTML5 (I believe) do you get the support for attributes without values, which is basically what the issue has a problem with.
The actual problem is that pug is assuming not HTML5, and mirroring attributes like you used to "have to do" (to be technically correct). The fix I'm proposing would be to special case the template type in the Vue transformer, and pass in a manual HTML5 doctype if it detects that you are using pug (so as to not pollute the local space when using other engines). However, this means that for Vue pug templates, you would be locked in to HTML5 by default.
Aside: ok, so I thought this was more drastic than it actually was. You can still override the doctype from the pug template and manually break this example, but only because the example expects HTML5 (I tested by forcing HTML4 on the document), so I will probably go ahead and make the PR.
Edit: Made the PR #8051
Beta Was this translation helpful? Give feedback.
All reactions