developit / htm

Hyperscript Tagged Markup: JSX alternative using standard tagged templates, with compiler support.
Apache License 2.0
8.64k stars 169 forks source link

Single line comments break props parsing #213

Open marvinhagemeister opened 2 years ago

marvinhagemeister commented 2 years ago

Single line comments in the opening tag seem to break props parsing. The rendered vnode will only receive an empty object as props.

html`<span
    // Every attribute after this comment will be dropped
    id="foo"
  />`

Actual Behavior

// returned vnode
{
  props: {},
}

Expected Behavior

// returned vnode
{
  props: { id: "foo" },
}