MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / parse_vault_frontmatter

Function parse_vault_frontmatter

atomic-repository/src/repository/vault.rs:796–798  ·  view source on GitHub ↗

Parse a markdown file's YAML frontmatter and body. Expects the file to optionally start with `---\n...\n---\n`. Returns `(frontmatter_json, body)` where frontmatter_json is the YAML frontmatter converted to a JSON string, and body is everything after the closing `---`. If there's no frontmatter, returns `("{}", full_content)`. Parse vault markdown frontmatter. Public within the crate so that `va

(content: &str)

Source from the content-addressed store, hash-verified

794/// Parse vault markdown frontmatter. Public within the crate so that
795/// `vault_intent_update` can read disk content before storing.
796pub(crate) fn parse_vault_frontmatter(content: &str) -> (String, String) {
797 parse_markdown_frontmatter(content)
798}
799
800fn parse_markdown_frontmatter(content: &str) -> (String, String) {
801 // Check for frontmatter delimiter

Calls 1