@wordpress/blocks
Version:
Block API for WordPress.
8 lines (7 loc) • 729 B
Source Map (JSON)
{
"version": 3,
"sources": ["../../../src/api/raw-handling/br-remover.js"],
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport { getSibling } from './utils';\n\n/**\n * Removes trailing br elements from text-level content.\n *\n * @param {Element} node Node to check.\n */\nexport default function brRemover( node ) {\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,MAAO;AACzC,MAAK,KAAK,aAAa,MAAO;AAC7B;AAAA,EACD;AAEA,UAAK,yBAAY,MAAM,MAAO,GAAI;AACjC;AAAA,EACD;AAEA,OAAK,WAAW,YAAa,IAAK;AACnC;",
"names": []
}