Repository navigation
Add source-preserving Markdown section updates - #15
Merged
Merged
Conversation
Port ruby-gem-release #53 with exact-heading validation, read-only validation and deterministic body replacement. Share mdast boundaries with changelogs while preserving surrounding source, Unicode, newline style and EOF policy. Exercise real file failures, repeated edits, installed consumers and public declarations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Ports dblock/ruby-gem-release#53. Add a class-first MarkdownSection helper for exact-heading validation and source-preserving body replacement in trusted lifecycle hooks. Preserve surrounding Unicode/source, ignore quoted/code/HTML heading examples, reject duplicate/missing headings and unsupported line endings, and preserve nonempty EOF newline policy. Changelogs share the same mdast parser and section boundaries rather than introducing another parser or regex document rewriting.
Depends on #14; second layer of the planned changelog → Markdown section → consumer testing stack. No publication or version changes.
Validation:
npm run test:coverage(80 passing tests; Markdown module 100% lines, branches and functions; overall 99.25% lines, 100% functions, 94.61% branches),npm run lint,git diff --check, andnpm run test:packagewith real installed API behavior and declarations.AI-authored by GitHub Copilot on behalf of @dblock.