Skip to content

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

Description

@zachleat

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>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions