WebReflection / uhtml

A micro HTML/SVG render

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unicode array rendering

thipages opened this issue · comments

commented

Hi,
I have unicode characters in an array and want to display them, but I got the string only except if I do not use the interpolation mechanism (which I need), see codepen here
Can you help?
Thank you.

import {render, html} from '//unpkg.com/uhtml?module';

const codes = Array(3).fill('').map((v,i)=>`&#${6016+i};`)
render (
  document.body,
  html`
    ${codes.map(code=>html`<div>${code}</div>`)}
    &#6016;
  `
)

output (like)

&#6016;
&#6017;
&#6018;

commented

oops, just seen #34 ... I am trying it

commented

working, I have updated codepen.
Have a good day!