Commit graph

1 commit

Author SHA1 Message Date
Aaron Bockelie
ebf1cc765f feat: Implement structured patch targeting for headings, blocks, and frontmatter
- Added support for targeting specific document structures in patch operations
- Heading targeting: Use 'Section::Subsection' syntax to target nested headings
- Block targeting: Target blocks by their ID (^blockId)
- Frontmatter targeting: Add, update, or append to frontmatter fields
- Maintains backward compatibility with oldText/newText replacement
- Added comprehensive unit tests for all patch modes

Example usage:
- Target heading: {targetType: 'heading', target: 'Section One', operation: 'append'}
- Target block: {targetType: 'block', target: 'myBlockId', operation: 'prepend'}
- Target frontmatter: {targetType: 'frontmatter', target: 'tags', operation: 'replace'}

Resolves the disconnect between API design and implementation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-06 22:47:02 -05:00