From 73f9e10c5f9161e816e5f7a2be0380df80fc30e5 Mon Sep 17 00:00:00 2001 From: Jeff Bowen Date: Mon, 19 Jul 2021 10:42:04 -0400 Subject: [PATCH] Use tabs instead of spaces in block transform doc example --- .../widgets/legacy-widget-block.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/how-to-guides/widgets/legacy-widget-block.md b/docs/how-to-guides/widgets/legacy-widget-block.md index 1939b4e9f2f48..7e629d482688c 100644 --- a/docs/how-to-guides/widgets/legacy-widget-block.md +++ b/docs/how-to-guides/widgets/legacy-widget-block.md @@ -111,10 +111,10 @@ This is done by adding JavaScript code to your block's definition. In this examp ```js transforms: { - from: [ - { - type: 'block', - blocks: [ 'core/legacy-widget' ], + from: [ + { + type: 'block', + blocks: [ 'core/legacy-widget' ], isMatch: ( { idBase, instance } ) => { if ( ! instance?.raw ) { // Can't transform if raw instance is not shown in REST API. @@ -122,13 +122,13 @@ transforms: { } return idBase === 'example_widget'; }, - transform: ( { instance } ) => { - return createBlock( 'example/block', { + transform: ( { instance } ) => { + return createBlock( 'example/block', { name: instance.raw.name, - } ); - }, - }, - ] + } ); + }, + }, + ] }, ```