I ran into this issue while trying to use highlight.js on code examples. Obviously, whitespace is very important in code so the current behavior just won't do.
Example
<strong>there should be</strong>
<strong>a space</strong>
When you put the above into your parser (e. g. on the demo page), the output lacks a space between be and a. This doesn't seem to be a htmlparser2 issue, because in its AST explorer demo, it does show a text node between the two elements [link here].
I ran into this issue while trying to use highlight.js on code examples. Obviously, whitespace is very important in code so the current behavior just won't do.
Example
When you put the above into your parser (e. g. on the demo page), the output lacks a space between be and a. This doesn't seem to be a htmlparser2 issue, because in its AST explorer demo, it does show a text node between the two elements [link here].