Skip to content

fix: repair unclosed managed blocks - #14

Merged
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
be-student:codex/10-repair-unclosed-managed-block
Sep 7, 2026
Merged

fix: repair unclosed managed blocks#14
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
be-student:codex/10-repair-unclosed-managed-block

Conversation

@be-student

Copy link
Copy Markdown
Contributor

Closes #10.

What does this PR do?

When a START marker has no matching END marker, merge() now treats the remaining tail as the incomplete managed block and replaces it in place. This preserves user lines before the marker and restores exactly one complete managed block.

Checklist

  • Tests pass (node --test: 11 passed)
  • Behavior is covered by a regression test
  • Added a CHANGELOG.md entry
  • Bumped the patch version to 0.1.4 as required
  • Followed the existing zero-dependency style

Notes

AI-assisted: implemented and validated with Codex.

@royalpinto007
royalpinto007 merged commit a85a7a6 into AgentPostmortem:main Sep 7, 2026
1 check passed
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.

merge() duplicates the managed block when a file has START without END

2 participants