Skip to content

JSX renderer renders self closing tags wrong #34

@marvinhagemeister

Description

@marvinhagemeister

Just noticed, that the jsx renderer double closes self closing tags like meta or base.

Test case:

const render = require("preact-render-to-string/jsx");

const html = <html><head><base href="foo/" /></head></html>;
console.log(render(html));
// Logs:
// <html>
//   <head>
//     <base href="foo/" /></base>
//   </head>
// </html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions