import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
import {
  require_dist
} from "./chunk-JSK7L46L.js";
import {
  __toESM
} from "./chunk-PZUWP5VK.js";

// src/vault/frontmatter.ts
var import_yaml = __toESM(require_dist(), 1);
function stripFrontmatter(raw) {
  const match = raw.match(/^---\n([\s\S]*?)\n---\n*/);
  if (!match) return { body: raw.trim(), frontmatter: {} };
  let frontmatter = {};
  try {
    frontmatter = import_yaml.default.parse(match[1]);
  } catch {
  }
  return { body: raw.slice(match[0].length).trim(), frontmatter };
}
function planFm(note) {
  return note.frontmatter;
}
function sessionFm(note) {
  return note.frontmatter;
}
function sporeFm(note) {
  return note.frontmatter;
}

export {
  stripFrontmatter,
  planFm,
  sessionFm,
  sporeFm
};
//# sourceMappingURL=chunk-RY76WEN3.js.map