@wordpress/block-library
Version:
Block library for the WordPress editor.
17 lines (13 loc) • 395 B
JavaScript
/**
* WordPress dependencies
*/
import { RawHTML } from '@wordpress/element';
export default function save( { attributes: { customText, noTeaser } } ) {
const moreTag = customText ? `<!--more ${ customText }-->` : '<!--more-->';
const noTeaserTag = noTeaser ? '<!--noteaser-->' : '';
return (
<RawHTML>
{ [ moreTag, noTeaserTag ].filter( Boolean ).join( '\n' ) }
</RawHTML>
);
}