Skip to content

Commit

Permalink
Serialize to the more tag
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsnell committed Jun 26, 2017
1 parent b5fb0c1 commit a1343a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions blocks/api/serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ export function serializeBlock( block ) {
const saveContent = getSaveContent( blockType, block.attributes );
const saveAttributes = getCommentAttributes( block.attributes, parseBlockAttributes( saveContent, blockType ) );

if ( 'wp:core/more' === blockName ) {
return `<!-- more ${ saveAttributes.customText ? `${ customText } ` : '' }-->${ saveAttributes.noTeaser ? '\n<!--noteaser-->' : '' }`;
}

const serializedAttributes = ! isEmpty( saveAttributes )
? serializeAttributes( saveAttributes ) + ' '
: '';
Expand Down

0 comments on commit a1343a4

Please sign in to comment.