Skip to content

Add source-preserving Markdown section updates - #15

Merged
dblock merged 1 commit into
dblock/changelog-templatesfrom
dblock/markdown-sections
Nov 11, 2026
Merged

dblock merged 1 commit into
dblock/changelog-templatesfrom
dblock/markdown-sections

Conversation

@dblock

@dblock dblock commented Nov 11, 2026

Copy link
Copy Markdown
Owner

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, and npm run test:package with real installed API behavior and declarations.

AI-authored by GitHub Copilot on behalf of @dblock.

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>
@dblock
dblock merged commit 932e73c into dblock/changelog-templates Nov 11, 2026
8 checks passed
@dblock
dblock deleted the dblock/markdown-sections branch November 11, 2026 17:53
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.

1 participant