isnt rendering in htm
- Langage dominant
- JavaScript
- Étoiles
- 9k
- Forks
- 181
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
When I have ` ` in htm, it's outputting as literally ` ` in the html.
I've seen some [similar questions for JSX](https://stackoverflow.com/questions/37909134/nbsp-jsx-not-working), but it seems that, even there, the space should render.
Is HTM's not rendering it as a non-breaking space intentional?
Here's a near-simplest case reproduction. Obviously the key is ``render(html`# #`, document.getElementById('root-element'));``. It comes out without a space.
```
Hello, Preact World!
window.render = window.preact.render;
window.html = window.htmPreact.html;
document.addEventListener('DOMContentLoaded', function () {
render(html`# #`, document.getElementById('root-element'));
});
```

(Strangely, if I click "edit html" in Chrome (well, here, Brave), it shows that starts with `&` so, for whatever reason, that `&` is a literal `&` in the render..)

Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.