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

Automatically ignore void element markup when used as host component #107

Closed
zachleat opened this issue Feb 16, 2023 · 0 comments
Closed
Labels
breaking-change enhancement New feature or request
Milestone

Comments

@zachleat
Copy link
Member

zachleat commented Feb 16, 2023

Page:

<img>

Component (img.webc):

<script webc:type="js" webc:root webc:raw>
`<img>`;
</script>

Currently renders:

<img><img>

In WebC v0.9.0 you can add webc:root="override" in your component definition (previously it was webc:root webc:keep) to workaround this issue.

ALL OF THAT SAID, I do think void element markup should be ignored in the rendered output by default when the host definition outputs markup.

New expected output

Component (img.webc): (even without webc:root webc:raw)

<script webc:type="js">
`<img>`;
</script>

Should render as:

<img>
@zachleat zachleat added enhancement New feature or request for-discussion labels Feb 16, 2023
@zachleat zachleat changed the title Automatically ignore void element markup when used as host component definition Automatically ignore void element markup when used as host component Feb 16, 2023
@zachleat zachleat added this to the WebC v0.10.0 milestone Mar 24, 2023
zachleat added a commit that referenced this issue Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant