Skip to content

Comments

Fix #130: Verify precedingWhitespace consistency across node types#141

Open
gnodet wants to merge 1 commit intomainfrom
fix/130-preceding-whitespace-consistency
Open

Fix #130: Verify precedingWhitespace consistency across node types#141
gnodet wants to merge 1 commit intomainfrom
fix/130-preceding-whitespace-consistency

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Feb 21, 2026

Summary

  • Verified that the parser already correctly sets precedingWhitespace on all node types (Comment, ProcessingInstruction, CDATA, Element)
  • Added an explicit test documenting and verifying this behavior

Test plan

  • Parse XML with Comment, PI, CDATA, and Element nodes with whitespace between them
  • Verify each node type has precedingWhitespace set by the parser
  • Verify round-trip serialization preserves all whitespace

Closes #130

…node types

The parser already correctly sets precedingWhitespace on all node types
(Comment, ProcessingInstruction, CDATA, Element). Add an explicit test
to document and verify this behavior.
@github-actions
Copy link

✅ CI Build PASSED

Build Status: PASSED
Java Version: 21
Maven Command: ./mvnw verify

🎉 All tests passed! The build is ready for merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

precedingWhitespace inconsistency

1 participant