/** * Frontmatter parsing and serialization for Obsidian markdown notes. * * Uses gray-matter for YAML frontmatter extraction. * Handles malformed frontmatter gracefully — never crashes, always recovers. */ export interface ParsedNote { /** YAML frontmatter as a plain object */ frontmatter: Record; /** Note body (markdown content after frontmatter) */ content: string; /** Whether the note had valid frontmatter */ hasFrontmatter: boolean; /** Tags extracted from frontmatter and inline #tags */ tags: string[]; } /** * Parse a raw note string into frontmatter + content. * Gracefully handles missing or malformed frontmatter. */ export declare function parseNote(raw: string): ParsedNote; /** * Serialize frontmatter and content back into a raw note string. */ export declare function serializeNote(frontmatter: Record, content: string): string; /** * Add tags to a note's frontmatter (deduplicates). * Returns the updated frontmatter object. */ export declare function addTags(frontmatter: Record, newTags: string[]): Record; /** * Remove tags from a note's frontmatter. * Returns the updated frontmatter object. */ export declare function removeTags(frontmatter: Record, tagsToRemove: string[]): Record; //# sourceMappingURL=frontmatter.d.ts.map