UNPKG

@wordpress/block-library

Version:
8 lines (7 loc) 997 B
{ "version": 3, "sources": ["../../src/html/transforms.js"], "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createBlock } from '@wordpress/blocks';\nimport { create } from '@wordpress/rich-text';\n\nconst transforms = {\n\tfrom: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/code' ],\n\t\t\ttransform: ( { content: html } ) => {\n\t\t\t\treturn createBlock( 'core/html', {\n\t\t\t\t\t// The code block may output HTML formatting, so convert it\n\t\t\t\t\t// to plain text.\n\t\t\t\t\tcontent: create( { html } ).text,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t],\n};\n\nexport default transforms;\n"], "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAA4B;AAC5B,uBAAuB;AAEvB,IAAM,aAAa;AAAA,EAClB,MAAM;AAAA,IACL;AAAA,MACC,MAAM;AAAA,MACN,QAAQ,CAAE,WAAY;AAAA,MACtB,WAAW,CAAE,EAAE,SAAS,KAAK,MAAO;AACnC,mBAAO,2BAAa,aAAa;AAAA;AAAA;AAAA,UAGhC,aAAS,yBAAQ,EAAE,KAAK,CAAE,EAAE;AAAA,QAC7B,CAAE;AAAA,MACH;AAAA,IACD;AAAA,EACD;AACD;AAEA,IAAO,qBAAQ;", "names": [] }