Conversation
Owner
|
Closing due to ignoring PR template and unapproved LLM use. |
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.
Adds a
newlineoption toToStringOptions, allowingstringify()andDocument#toString()to emit\r\nline endings, as discussed in #706.Following the approach suggested there, the substitution is applied as a
final
.replace(/\r?\n/g, '\r\n')over the completed document, which issafe since line breaks in scalars are normalized to
\nwhen parsing.src/options.ts— declare thenewlineoptionsrc/stringify/stringify.ts— default value ('\n')src/stringify/stringifyDocument.ts— apply the replacement at the final jointests/doc/stringify.ts— 5 tests: default output, whole-documentconversion,
Document#toString, directives, andtoStringDefaultsdocs/03_options.md— document the new optionCloses #706
LLM Use
Adding this disclosure after the fact: the code, tests and the original description of this PR were prepared with AI assistance (Claude), and the comment on #706 was AI-drafted as well. The contributing guide's LLM section asks for this to be declared and pre-approved in an issue first; that step was missed here because I looked for CONTRIBUTING at the repo root instead of
docs/. Sorry for that.How to proceed is entirely up to you: if you'd rather not take an assisted PR that skipped the approval step, close it and that's completely fair. If it can continue as declared LLM-assisted work, I can explain every part of the implementation and will keep further issue/PR comments in my own words.