UNPKG

@wordpress/blocks

Version:
32 lines (31 loc) 756 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = msListIgnore; /** * Looks for comments, and removes them. * * @param {Node} node The node to be processed. * @return {void} */ function msListIgnore(node) { if (node.nodeType !== node.ELEMENT_NODE) { return; } const style = node.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') { node.remove(); } } //# sourceMappingURL=ms-list-ignore.js.map