UNPKG

@tabnews/ui

Version:
13 lines (12 loc) 360 B
function c({ clobberPrefix: p = "user-content-" }) { function e(r) { var i; (i = r.properties) != null && i.id && (r.properties.id = r.properties.id.replace(new RegExp(`^(${p}){2,}`), p)), r.children && r.children.forEach((o) => e(o)); } return { rehype: (r) => r.use(() => (i) => e(i)) }; } export { c as removeDuplicateClobberPrefix };