const getHeadingAnchor = ({ id, text }) => {
  const slug = (text || "").trim().toLowerCase().replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
  const suffix = (id || "section").toLowerCase().replace(/[^a-z0-9-]/g, "").slice(0, 8);
  return `${slug || "section"}-${suffix || "anchor"}`;
};
export {
  getHeadingAnchor
};
//# sourceMappingURL=get-heading-anchor.js.map
