Deschtex / html2react

A utility for turning raw HTML into React elements.
MIT License
43 stars 5 forks source link

Do not parse child nodes if the only child node is a text node #5

Closed Deschtex closed 8 years ago

Deschtex commented 8 years ago

Partially done by https://github.com/Deschtex/html2react/commit/0ad740fcbfda74989e663e1572fec5a57c2d9d8e#diff-5331c6d9a6e7006f165da02ffb94886cR13. It is now up to the React version used by the consumer. React v15 does not render spans for text nodes.

xaviervia commented 8 years ago

So html2react works with v15+? Fine by me.

Deschtex commented 8 years ago

It does. I just had to remove the explicit creation of spans for text nodes.