@wordpress/blocks
Version:
Block API for WordPress.
8 lines (7 loc) • 830 B
Source Map (JSON)
{
"version": 3,
"sources": ["../../../src/api/raw-handling/google-docs-uid-remover.js"],
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { unwrap } from '@wordpress/dom';\n\nexport default function googleDocsUIdRemover( node ) {\n\tif ( ! node.id || node.id.indexOf( 'docs-internal-guid-' ) !== 0 ) {\n\t\treturn;\n\t}\n\n\t// Google Docs sometimes wraps the content in a B tag. We don't want to keep\n\t// this.\n\tif ( node.tagName === 'B' ) {\n\t\tunwrap( node );\n\t} else {\n\t\tnode.removeAttribute( 'id' );\n\t}\n}\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iBAAuB;AAER,SAAR,qBAAuC,MAAO;AACpD,MAAK,CAAE,KAAK,MAAM,KAAK,GAAG,QAAS,qBAAsB,MAAM,GAAI;AAClE;AAAA,EACD;AAIA,MAAK,KAAK,YAAY,KAAM;AAC3B,2BAAQ,IAAK;AAAA,EACd,OAAO;AACN,SAAK,gBAAiB,IAAK;AAAA,EAC5B;AACD;",
"names": []
}