Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Aug 30, 2024
1 parent b3028fa commit 2e594b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/block-library/src/media-text/transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { createBlock } from '@wordpress/blocks';

function transform(
function unwrap(
{ mediaType, mediaPosition, mediaAlt, mediaId, mediaUrl, anchor },
innerBlocks
) {
Expand Down Expand Up @@ -121,19 +121,19 @@ const transforms = {
type: 'block',
blocks: [ 'core/image' ],
isMatch: ( { mediaType } ) => mediaType === 'image',
transform,
transform: unwrap,
},
{
type: 'block',
blocks: [ 'core/video' ],
isMatch: ( { mediaType } ) => mediaType === 'video',
transform,
transform: unwrap,
},
{
type: 'block',
// To do: ideally this should be '*', and quote should also use '*'.
blocks: [ 'core/paragraph' ],
transform,
transform: unwrap,
},
{
type: 'block',
Expand Down

0 comments on commit 2e594b7

Please sign in to comment.