fix: deleting a key added before a table leaves a blank line behind - #579
Open
MildlyMeticulous wants to merge 1 commit into
Open
fix: deleting a key added before a table leaves a blank line behind#579MildlyMeticulous wants to merge 1 commit into
MildlyMeticulous wants to merge 1 commit into
Conversation
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.
Summary
Adding a key to a document that begins with a table inserts a blank line to separate the new key from
[a]. Deleting that key leaves the blank line behind, so the round trip doesn't restore the original document.The separator was stored as the table's
indent, so it outlived the key it was inserted for. It now trails the inserted item and is removed along with it. Repeated inserts still yield exactly one blank line, the behaviour asked for in #178, and there's a test covering that as well.1053 tests pass.
Agent Drafting Metadata