Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion blocks/api/serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function getCommentAttributes( realAttributes, expectedAttributes ) {
return memo;
}

return memo + `${ key }:${ value } `;
return memo + `${ key }="${ value }" `;
}, '' );
}

Expand Down
6 changes: 3 additions & 3 deletions blocks/api/test/serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe( 'block serializer', () => {
fruit: 'bananas'
} );

expect( attributes ).to.equal( 'category:food ripeness:ripe ' );
expect( attributes ).to.equal( 'category="food" ripeness="ripe" ' );
} );

it( 'should not append an undefined attribute value', () => {
Expand All @@ -83,7 +83,7 @@ describe( 'block serializer', () => {
fruit: 'bananas'
} );

expect( attributes ).to.equal( 'category:food ' );
expect( attributes ).to.equal( 'category="food" ' );
} );
} );

Expand All @@ -109,7 +109,7 @@ describe( 'block serializer', () => {
}
}
];
const expectedPostContent = '<!-- wp:core/test-block align:left -->\n<p>Ribs & Chicken</p>\n<!-- /wp:core/test-block -->\n\n';
const expectedPostContent = '<!-- wp:core/test-block align="left" -->\n<p>Ribs & Chicken</p>\n<!-- /wp:core/test-block -->\n\n';

expect( serialize( blockList ) ).to.eql( expectedPostContent );
} );
Expand Down