diff --git a/src/blocks/highlight/test/transforms.spec.js b/src/blocks/highlight/test/transforms.spec.js index ff82008a3e4..096f007b117 100644 --- a/src/blocks/highlight/test/transforms.spec.js +++ b/src/blocks/highlight/test/transforms.spec.js @@ -52,7 +52,9 @@ describe( 'coblocks/highlight transforms', () => { expect( block.attributes.content ).toBe( content ); } ); - it( 'should transform raw html to block', () => { + // This test is failing due to removal of raw transforms. + // The raw transforms no longer process the given HTML as expected. + it.skip( 'should transform raw html to block', () => { const content = 'Lorem ipsum dolor sit amet.'; const HTML = `

${ content }

`; diff --git a/src/blocks/highlight/transforms.js b/src/blocks/highlight/transforms.js index 5510ad23579..52ad743b223 100644 --- a/src/blocks/highlight/transforms.js +++ b/src/blocks/highlight/transforms.js @@ -2,7 +2,6 @@ * Internal dependencies */ import metadata from './block.json'; -import getPhrasingContentSchema from '../../utils/get-phrasing-content-schema'; /** * WordPress dependencies @@ -20,19 +19,6 @@ const transforms = { } ); }, }, - { - type: 'raw', - selector: 'p.wp-block-coblocks-highlight', - schema: { - p: { - children: { - mark: { - children: getPhrasingContentSchema(), - }, - }, - }, - }, - }, { type: 'prefix', prefix: ':highlight', diff --git a/src/utils/get-phrasing-content-schema.js b/src/utils/get-phrasing-content-schema.js deleted file mode 100644 index 2c97b55e469..00000000000 --- a/src/utils/get-phrasing-content-schema.js +++ /dev/null @@ -1,12 +0,0 @@ -import { getPhrasingContentSchema as getPhrasingContentSchemaDOM } from '@wordpress/dom'; -import { getPhrasingContentSchema as getPhrasingContentSchemaBlocks } from '@wordpress/blocks'; - -let getPhrasingContentSchema = getPhrasingContentSchemaBlocks; - -// if getPhrasingContentSchemaDOM is available it is because -// we are using a post 5.6 version of WP -if ( typeof getPhrasingContentSchemaDOM === 'function' ) { - getPhrasingContentSchema = getPhrasingContentSchemaDOM; -} - -export default getPhrasingContentSchema;