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

[html] closing tag with component renders extra ">" character in output #156

Open
trusktr opened this issue Aug 4, 2022 · 1 comment
Open

Comments

@trusktr
Copy link
Contributor

trusktr commented Aug 4, 2022

This html template markup,

  return html`<${For} each=${() => [1, 2, 3]}>${n => html`<h1>${n}</h1>`}</${For}>`

renders a ">" character at the end.

Demo:

https://playground.solidjs.com/?hash=149145402&version=1.4.1

The component seems to work fine, apart from the extra character output into the DOM.

It was a human brain mistake, I forgot that the closing tag should be </> which works fine,

https://playground.solidjs.com/?hash=-1483155291&version=1.4.1

although the </${For}> closing tag should probably just work too.

The workaround is easy though.

@trusktr
Copy link
Contributor Author

trusktr commented Aug 4, 2022

Oh! Another problem is, Prettier automatically changes </> to </${For}>. Heh.

@trusktr trusktr changed the title [lit-dom-expressions] closing tag with component renders extra ">" character in output [html] closing tag with component renders extra ">" character in output Aug 9, 2023
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

No branches or pull requests

1 participant