UNPKG

@wordpress/blocks

Version:
8 lines (7 loc) 633 B
{ "version": 3, "sources": ["../../../src/api/raw-handling/empty-paragraph-remover.js"], "sourcesContent": ["/**\n * Removes empty paragraph elements.\n *\n * @param {Element} node Node to check.\n */\nexport default function emptyParagraphRemover( node ) {\n\tif ( node.nodeName !== 'P' ) {\n\t\treturn;\n\t}\n\n\tif ( node.hasChildNodes() ) {\n\t\treturn;\n\t}\n\n\tnode.parentNode.removeChild( node );\n}\n"], "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKe,SAAR,sBAAwC,MAAO;AACrD,MAAK,KAAK,aAAa,KAAM;AAC5B;AAAA,EACD;AAEA,MAAK,KAAK,cAAc,GAAI;AAC3B;AAAA,EACD;AAEA,OAAK,WAAW,YAAa,IAAK;AACnC;", "names": [] }