Skip to content

Fix header spacing and attached comments during property insertion - #93

Merged
quintesse merged 2 commits into
mainfrom
fix_88_89
Oct 1, 2026
Merged

quintesse merged 2 commits into
mainfrom
fix_88_89

Conversation

@quintesse

@quintesse quintesse commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Inserting before the first property could move the header's blank line, and inserting before an indented property could split its attached comment block. These fixes preserve header spacing and insert before the complete attached comment block, including its indentation.

Adopts the four regression examples from #88 and #89, including the afterHeader() example in #88's comment, with the supplied expectStoreText helper. Adds a direct LF/CRLF cursor test covering headers with zero through three line endings. afterHeader() leaves at most one blank line after the header, and ordinary insertion adds only missing header spacing.

Fixes #88
Fixes #89

@quintesse
quintesse merged commit 20ba76c into main Oct 1, 2026
1 check passed
@quintesse
quintesse deleted the fix_88_89 branch October 1, 2026 20:02
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.

Put 'beforeProperty' breaks with indented properties. Put 'beforeFirstProperty' breaks header comments.

1 participant