fix: prevent rename from corrupting overlapping entity ids - #2
Merged
Conversation
Entity rename replaced the old id as a raw substring across every markdown file, so renaming a character with id mara rewrote references to the distinct character mara-quill and prose words like marathon. Replace only whole ids by rejecting matches adjacent to id characters. https://claude.ai/code/session_01Xnb2gMa3UfGKJYRXkjuwNJ
Removing an entity re-serialized the frontmatter of every markdown file in the project, even files that never referenced the removed id. That dropped hand-written YAML comments and dirtied mtimes project-wide. Only write files whose frontmatter data actually changed. https://claude.ai/code/session_01Xnb2gMa3UfGKJYRXkjuwNJ
A bare key with no value (e.g. `introduced:`) parsed as an empty list, so validation reported the confusing error "field introduced must be a scalar" for what a user wrote as an empty scalar. Parse it as an empty string, matching how the CLI serializes empty values. Keys followed by ` - ` items still parse as lists. https://claude.ai/code/session_01Xnb2gMa3UfGKJYRXkjuwNJ
EPUB 3 requires a dcterms:modified metadata element, which epubcheck flagged as missing. The DOCX referenced Title and Heading1 paragraph styles without shipping a styles part, so headings rendered unstyled. Add the modified timestamp to content.opf and a minimal word/styles.xml with its relationship and content-type entries. https://claude.ai/code/session_01Xnb2gMa3UfGKJYRXkjuwNJ
The argument parser treats any next token starting with a dash as a flag, so space-separated values like --synopsis "-A dash" are silently dropped. Document the --option=value escape hatch in the help text. https://claude.ai/code/session_01Xnb2gMa3UfGKJYRXkjuwNJ
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.
Entity rename replaced the old id as a raw substring across every
markdown file, so renaming a character with id mara rewrote references
to the distinct character mara-quill and prose words like marathon.
Replace only whole ids by rejecting matches adjacent to id characters.
https://claude.ai/code/session_01Xnb2gMa3UfGKJYRXkjuwNJ