Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

normalize() should drop empty text nodes #411

Open
marrus-sh opened this issue May 11, 2022 · 1 comment
Open

normalize() should drop empty text nodes #411

marrus-sh opened this issue May 11, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation help-wanted External contributions welcome spec:DOM-Level-2 https://www.w3.org/TR/DOM-Level-2-Core/ testing
Milestone

Comments

@marrus-sh
Copy link

marrus-sh commented May 11, 2022

DOM Level 2 states :—

Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes.

https://www.w3.org/TR/DOM-Level-2-Core/#core-ID-normalize

Right now in xmldom, empty text nodes are not removed.

@karfau karfau added documentation Improvements or additions to documentation help-wanted External contributions welcome spec:DOM-Level-2 https://www.w3.org/TR/DOM-Level-2-Core/ testing labels May 11, 2022
@karfau karfau added this to the before 1.0.0 milestone May 11, 2022
@karfau
Copy link
Member

karfau commented May 11, 2022

Thx for pointing it out.
I think it should not be to tricky to implement, including tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help-wanted External contributions welcome spec:DOM-Level-2 https://www.w3.org/TR/DOM-Level-2-Core/ testing
Projects
None yet
Development

No branches or pull requests

2 participants