Repository navigation
Preserve controls when writing quoted and multiline YAML strings - #258
Merged
Merged
Conversation
Use literal block output only when non-printable characters are LF or TAB. Preserve other controls through the existing escaped YAML string path instead of emitting invalid characters or normalizing/truncating values. Cover 144 public output-validity/roundtrip/format checks. AI disclosure: This work was prepared with assistance from OpenAI Codex.
Preserve the complete 52 folding and 144 writer-control checks when incorporating current master. The writer guard is unchanged. AI disclosure: This work was prepared with assistance from OpenAI Codex.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #258 +/- ##
=======================================
Coverage 87.56% 87.57%
=======================================
Files 15 15
Lines 1649 1650 +1
=======================================
+ Hits 1444 1445 +1
Misses 205 205 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Writing a string containing a quote or newline selects a literal block and bypasses escaping. With a NUL character, reading that output silently truncates the value; other control characters produce illegal YAML or can normalize line endings/change the value.
Use literal blocks only when non-printable characters are LF or TAB. For other controls, reuse the existing escaped double-quoted output. Ordinary printable multiline strings and quoted strings containing tabs retain their block formatting. The guard follows the YAML character-set requirements.
Validation:
git diff --checkpasses.Exact master merge
82ca3c84b4296e86209dd25907aed557697dd3f9also passes all 20 jobs in run 37183435713. The stable Linux upload was accepted at the correct destination (11,240 bytes), with all 20 sessions processed at 87.57%.No dependencies, schema changes, exports, or version changes.
Co-authored by Codex
AI disclosure: This work was prepared with assistance from OpenAI Codex.