Skip to content

Fix examples in HTML mode #1636

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

Merged
merged 1 commit into from
Mar 25, 2022
Merged

Conversation

skirtles-code
Copy link
Contributor

Fixes #1634.

Several of the examples don't work correctly if the HTML/SFC switch is set to HTML.

The main problem is that <input /> and <br /> is transformed to <input></input> and <br></br>. For some examples this is harmless and just leads to strange-looking code, but for other examples it breaks the parsing, leading to incorrect rendering or an error.

Rather than fixing the transform I've just removed the unnecessary closing slash from those tags.

There were also a couple of problems with the Circle Drawer demo. These only applied to the Composition API version. Two things used in the template were not being returned from setup. In SFC mode this still worked because the return is stripped out by a transform, but in HTML mode that return needs to return the correct things.

@netlify
Copy link

netlify bot commented Mar 24, 2022

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit 8821965
🔍 Latest deploy log https://app.netlify.com/sites/vuejs/deploys/623bb79dafd2aa00082a4a22
😎 Deploy Preview https://deploy-preview-1636--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@NataliaTepluhina NataliaTepluhina merged commit ee52529 into vuejs:main Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken TodoMVC example
2 participants