UNPKG

@wordpress/blocks

Version:
29 lines (28 loc) 663 B
// packages/blocks/src/api/raw-handling/ms-list-ignore.ts function msListIgnore(node) { if (node.nodeType !== node.ELEMENT_NODE) { return; } const el = node; const style = el.getAttribute("style"); if (!style || !style.includes("mso-list")) { return; } const rules = style.split(";").reduce( (acc, rule) => { const [key, value] = rule.split(":"); if (key && value) { acc[key.trim().toLowerCase()] = value.trim().toLowerCase(); } return acc; }, {} ); if (rules["mso-list"] === "ignore") { el.remove(); } } export { msListIgnore as default }; //# sourceMappingURL=ms-list-ignore.mjs.map