react-html-parser
react-html-parser copied to clipboard
remove isEmptyTextNode check
I suggest this as a fix for https://github.com/wrakky/react-html-parser/issues/39
To be honest, I don't even know why you would assume that only specifically whitespace nodes with newlines are empty. Yet that's what the code says.
export default function isEmptyTextNode(node) {
return node.type === 'text' && /\r?\n/.test(node.data) && node.data.trim() === '';
}