I have this code:
import { __ } from '@wordpress/i18n';
import { registerBlockType } from '@wordpress/blocks';
const blockStyle = {
backgroundColor: '#900',
color: '#fff',
padding: '20px',
};
registerBlockType( 'gutenberg-examples/example-01-basic-esnext', {
title: __( 'Example: Basic (ESNext)', 'gutenberg-examples' ),
icon: 'universal-access-alt',
category: 'layout',
example: {},
edit() {
return (
<div style={ blockStyle }>editor.</div>
);
},
save() {
return (
<div style={ blockStyle }>Hello World, step 1 (from the frontend edited file src/indexjs).</div>
);
},
} );
The code highlights correctly up to the first but them makes everything afterwars (including the brackets) yellow like a quote. I already found a workaround for this which is to surround the with single quotes but I want to get a real fix for this issue, not a workaround.