Fix quoted text in indented HTML serialization - #37
Open
Joseph-Mutua wants to merge 1 commit into
Open
Joseph-Mutua wants to merge 1 commit into
Joseph-Mutua wants to merge 1 commit into
Conversation
Contributor
Author
Verification evidenceAttached are the reproduction and verification artifacts for issue #35:
issue-35-before.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@zyc9012 @forthrin :
Summary
Fix indented HTML serialization adding artificial quotation marks around text nodes.
Fixes #35.
Problem
Nokolexbor delegates indented output to Lexbor's pretty tree serializer. That serializer represents text as quoted diagnostic strings, including whitespace-only nodes, so the quotes became literal HTML output.
Changes
inner_htmlandouter_htmlserializationBefore
After
The whitespace-only text node remains present but is no longer wrapped in synthetic quotes.
Testing
bundle exec ruby -Ilib -Ispec spec/node_spec.rb— 136 runs, 315 assertionsbundle exec ruby -Ilib -Ispec spec/node_set_spec.rb— 58 runs, 122 assertionsbundle exec ruby -Ilib -Ispec spec/document_fragment_spec.rb— 14 runs, 24 assertionsbundle exec rake— 311 runs, 4,651 assertionsgem build nokolexbor.gemspec— successAll test commands completed with zero failures, errors, or skips.
Notes
diffprocess to stall. No sanitizer error was emitted; the repository's Linux CI memory check remains authoritative.