import u from "github-slugger";
const l = (t, g) => t.map((e) => ({
  ...e,
  slug: g.slug(e.value)
}));
function s(t) {
  const g = new u(), e = new RegExp("^(#{1,6}) (?!#)(.*)", "gm"), r = [...t.matchAll(e)].map((n) => ({
    value: n[2],
    depth: n[1].length
  }));
  return l(r, g);
}
export {
  s as getHeadingsFromMarkdown
};
