Ignores non-significant Text node and preserves significant white space characters
Based on #113 (closed)
This merge request ignores non-significant Node
such as
- A
Text
node that is all whitespace - A
Comment
node
It also preserves Text
node that does not have any sibling such as:
<p> </p>
And Text
node with a sibling, such as:
Hello <span>world</span>
Here, the Text
node after "Hello" and before the <span>
element must be preserved. In this case, the textContent
is updated to a single space:
Hello <span>world</span>
I think it should fix a few issues:
- https://gitlab.pagedmedia.org/tools/pagedjs/issues/139
- https://gitlab.pagedmedia.org/tools/pagedjs/issues/123
- https://gitlab.pagedmedia.org/tools/pagedjs/issues/126
I will try to add additional tests cases.