Skip to content

Fix incorrect handling of CDATA content. See #15.#16

Open
pavelhoral wants to merge 2 commits intovkiryukhin:masterfrom
pavelhoral:fix-cdata
Open

Fix incorrect handling of CDATA content. See #15.#16
pavelhoral wants to merge 2 commits intovkiryukhin:masterfrom
pavelhoral:fix-cdata

Conversation

@pavelhoral
Copy link

  • Removed greedy space removal between elements (not sure if that can break anything).
  • XML declaration <?xml won't format CDATA won't add new-line.

Changed test to contain:

<![CDATA[ <?<z>   </z> ]]>

That should display effect of both changes.

@pavelhoral
Copy link
Author

Just noticed that the change is introducing unwanted new-lines in case there were new-lines in the source. WiIl look into this and update the merge request.

@pavelhoral
Copy link
Author

Fixed. I have replaced the original greedy white-space removal with additional condition which removes excessive white-space when not in comment context.

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.

1 participant