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

Function parse_vault_frontmatter

atomic-repository/src/repository/vault.rs:809–811  ·  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

807/// Parse vault markdown frontmatter. Public within the crate so that
808/// `vault_intent_update` can read disk content before storing.
809pub(crate) fn parse_vault_frontmatter(content: &str) -> (String, String) {
810 parse_markdown_frontmatter(content)
811}
812
813fn parse_markdown_frontmatter(content: &str) -> (String, String) {
814 // Check for frontmatter delimiter

Calls 1