@wordpress/blocks
Version:
Block API for WordPress.
8 lines (7 loc) • 734 B
Source Map (JSON)
{
"version": 3,
"sources": ["../../../src/api/raw-handling/br-remover.ts"],
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport { getSibling } from './utils';\n\n/**\n * Removes trailing br elements from text-level content.\n *\n * @param node Node to check.\n */\nexport default function brRemover( node: Node ): void {\n\tif ( node.nodeName !== 'BR' ) {\n\t\treturn;\n\t}\n\n\tif ( getSibling( node, 'next' ) ) {\n\t\treturn;\n\t}\n\n\tnode.parentNode!.removeChild( node );\n}\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,mBAA2B;AAOZ,SAAR,UAA4B,MAAmB;AACrD,MAAK,KAAK,aAAa,MAAO;AAC7B;AAAA,EACD;AAEA,UAAK,yBAAY,MAAM,MAAO,GAAI;AACjC;AAAA,EACD;AAEA,OAAK,WAAY,YAAa,IAAK;AACpC;",
"names": []
}