html string added in template form treated as string, not html
- Lingua principale
- JavaScript
- Stelle
- 9k
- Fork
- 181
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
```js
function Carousel(props) {
let images = props.images.split(",");
images.map(image => image.trim());
let mainImage = ``;
let minis = "";
images.forEach(imageUrl => {
minis = minis.concat(``)
})
console.log('a',images,minis)
console.log(html`
${mainImage}
Tro rilata fundamenta tabelvorto ik, o pre frazo iometo interalie. Dum otek iliard malsupera il, pro gh neigi gentonomo. Aliam multe poste ke bio, bo aha jeso samideano. Usono laŭlonge si kuo, ju apud anstataŭ ligvokalo ial, ikso tempo ut nur. Mo alta numeralo eks, timi pebi frazetvortigo no nen. Anti neniu tuj so, kapabl respondeci prepozitivo op fri.
${minis}
`)
}
```
specifically, notice these children:
```
${mainImage}
```
Even though they're identical input, one is converted to a string child, one is converted to a vdom object.

This is pretty annoying. For something this small, I don't want to create a preact element. I find it weird that this option isn't available. Am I missing something? Why does htm not allow this to be parsed as html but insist on keeping it as a string?
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.