Whitespace text nodes cannot appear as a child of <table>
brainstorm1313 opened this issue · comments
brainstorm1313 commented
I expect correct parse:
parse('<table>\n<tbody><tr><td>sdfq</td></tr></tbody></table>')
It works, but Chrome console has error:
Warning: validateDOMNesting(...): Whitespace text nodes cannot appear as a child of
https://jsfiddle.net/2f7tpmx5/1/
Mark commented
This is similar to aknuds1/html-to-react#79
Long story short, this parser (like html-to-react) creates whitespace text nodes given the input HTML.
The HTML to DOM parser that we use is html-dom-parser.
Fortunately, this is a warning and not an error. However, it might be worth looking into stripping out the whitespace nodes for this library.