@tabnews/ui
Version:
TabNews UI
13 lines (12 loc) • 360 B
JavaScript
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
};