- 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>