Closed maranomynet closed 5 years ago
Bublé's JSX parser turns all non-breaking space characters into the string .
/**@jsx h */ <p> </p>
...becomes...
/**@jsx h */ h( 'p', null, " " )
(Playground: https://buble.surge.sh/#%2F**%40jsx%20h%20*%2F%0A%3Cp%3E%C2%A0%3C%2Fp%3E)
This is A) Different from what Babel does, and B) makes it impossible to pass the resulting string straight into HTMLElement#textContent.
HTMLElement#textContent
P.S. This breaks both Mithril.js and Hyperscript.js https://codesandbox.io/s/priceless-hooks-dxw32?fontsize=14
Bublé's JSX parser turns all non-breaking space characters into the string
....becomes...
(Playground: https://buble.surge.sh/#%2F**%40jsx%20h%20*%2F%0A%3Cp%3E%C2%A0%3C%2Fp%3E)
This is A) Different from what Babel does, and B) makes it impossible to pass the resulting string straight into
HTMLElement#textContent
.P.S. This breaks both Mithril.js and Hyperscript.js https://codesandbox.io/s/priceless-hooks-dxw32?fontsize=14