From a6fe68bb27efbc50e13b7dab8f683faac1fc0d82 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Thu, 22 Jun 2017 18:00:20 +0100 Subject: [PATCH 1/7] Blocks: Automatically generate a wrapper classname for blocks --- blocks/api/serializer.js | 22 ++++++++++++++----- blocks/api/test/serializer.js | 7 ++++-- blocks/test/fixtures/core-button-center.html | 2 +- .../core-button-center.serialized.html | 2 +- blocks/test/fixtures/core-code.html | 2 +- .../test/fixtures/core-code.serialized.html | 2 +- blocks/test/fixtures/core-embed.html | 2 +- .../test/fixtures/core-embed.serialized.html | 2 +- blocks/test/fixtures/core-embedanimoto.html | 2 +- .../core-embedanimoto.serialized.html | 2 +- blocks/test/fixtures/core-embedcloudup.html | 2 +- .../core-embedcloudup.serialized.html | 2 +- .../test/fixtures/core-embedcollegehumor.html | 2 +- .../core-embedcollegehumor.serialized.html | 2 +- .../test/fixtures/core-embeddailymotion.html | 2 +- .../core-embeddailymotion.serialized.html | 2 +- blocks/test/fixtures/core-embedfacebook.html | 2 +- .../core-embedfacebook.serialized.html | 2 +- blocks/test/fixtures/core-embedflickr.html | 2 +- .../fixtures/core-embedflickr.serialized.html | 2 +- .../test/fixtures/core-embedfunnyordie.html | 2 +- .../core-embedfunnyordie.serialized.html | 2 +- blocks/test/fixtures/core-embedhulu.html | 2 +- .../fixtures/core-embedhulu.serialized.html | 2 +- blocks/test/fixtures/core-embedimgur.html | 2 +- .../fixtures/core-embedimgur.serialized.html | 2 +- blocks/test/fixtures/core-embedinstagram.html | 2 +- .../core-embedinstagram.serialized.html | 2 +- blocks/test/fixtures/core-embedissuu.html | 2 +- .../fixtures/core-embedissuu.serialized.html | 2 +- .../test/fixtures/core-embedkickstarter.html | 2 +- .../core-embedkickstarter.serialized.html | 2 +- blocks/test/fixtures/core-embedmeetupcom.html | 2 +- .../core-embedmeetupcom.serialized.html | 2 +- blocks/test/fixtures/core-embedmixcloud.html | 2 +- .../core-embedmixcloud.serialized.html | 2 +- .../test/fixtures/core-embedphotobucket.html | 2 +- .../core-embedphotobucket.serialized.html | 2 +- blocks/test/fixtures/core-embedpolldaddy.html | 2 +- .../core-embedpolldaddy.serialized.html | 2 +- blocks/test/fixtures/core-embedreddit.html | 2 +- .../fixtures/core-embedreddit.serialized.html | 2 +- .../test/fixtures/core-embedreverbnation.html | 2 +- .../core-embedreverbnation.serialized.html | 2 +- .../test/fixtures/core-embedscreencast.html | 2 +- .../core-embedscreencast.serialized.html | 2 +- blocks/test/fixtures/core-embedscribd.html | 2 +- .../fixtures/core-embedscribd.serialized.html | 2 +- .../test/fixtures/core-embedslideshare.html | 2 +- .../core-embedslideshare.serialized.html | 2 +- blocks/test/fixtures/core-embedsmugmug.html | 2 +- .../core-embedsmugmug.serialized.html | 2 +- .../test/fixtures/core-embedsoundcloud.html | 2 +- .../core-embedsoundcloud.serialized.html | 2 +- blocks/test/fixtures/core-embedspeaker.html | 2 +- .../core-embedspeaker.serialized.html | 2 +- blocks/test/fixtures/core-embedspotify.html | 2 +- .../core-embedspotify.serialized.html | 2 +- blocks/test/fixtures/core-embedted.html | 2 +- .../fixtures/core-embedted.serialized.html | 2 +- blocks/test/fixtures/core-embedtumblr.html | 2 +- .../fixtures/core-embedtumblr.serialized.html | 2 +- blocks/test/fixtures/core-embedtwitter.html | 2 +- .../core-embedtwitter.serialized.html | 2 +- .../test/fixtures/core-embedvideopress.html | 2 +- .../core-embedvideopress.serialized.html | 2 +- blocks/test/fixtures/core-embedvimeo.html | 2 +- .../fixtures/core-embedvimeo.serialized.html | 2 +- blocks/test/fixtures/core-embedvine.html | 2 +- .../fixtures/core-embedvine.serialized.html | 2 +- blocks/test/fixtures/core-embedwordpress.html | 2 +- .../core-embedwordpress.serialized.html | 2 +- .../test/fixtures/core-embedwordpresstv.html | 2 +- .../core-embedwordpresstv.serialized.html | 2 +- blocks/test/fixtures/core-embedyoutube.html | 2 +- .../core-embedyoutube.serialized.html | 2 +- .../fixtures/core-freeform.serialized.html | 2 +- blocks/test/fixtures/core-gallery.html | 2 +- .../fixtures/core-gallery.serialized.html | 2 +- blocks/test/fixtures/core-heading-h2-em.html | 2 +- .../core-heading-h2-em.serialized.html | 2 +- blocks/test/fixtures/core-heading-h2.html | 2 +- .../fixtures/core-heading-h2.serialized.html | 2 +- .../fixtures/core-image-center-caption.html | 2 +- .../core-image-center-caption.serialized.html | 2 +- blocks/test/fixtures/core-image.html | 2 +- .../test/fixtures/core-image.serialized.html | 2 +- blocks/test/fixtures/core-list-ul.html | 2 +- .../fixtures/core-list-ul.serialized.html | 2 +- blocks/test/fixtures/core-preformatted.html | 2 +- .../core-preformatted.serialized.html | 2 +- blocks/test/fixtures/core-pullquote.html | 2 +- .../fixtures/core-pullquote.serialized.html | 2 +- blocks/test/fixtures/core-quote-style-1.html | 2 +- .../core-quote-style-1.serialized.html | 2 +- blocks/test/fixtures/core-quote-style-2.html | 2 +- .../core-quote-style-2.serialized.html | 2 +- blocks/test/fixtures/core-separator.html | 2 +- .../fixtures/core-separator.serialized.html | 2 +- blocks/test/fixtures/core-table.html | 2 +- .../test/fixtures/core-table.serialized.html | 2 +- .../test/fixtures/core-text-align-right.html | 2 +- .../core-text-align-right.serialized.html | 2 +- 103 files changed, 123 insertions(+), 108 deletions(-) diff --git a/blocks/api/serializer.js b/blocks/api/serializer.js index 836afa5fc0db7..4991f5b49288c 100644 --- a/blocks/api/serializer.js +++ b/blocks/api/serializer.js @@ -1,13 +1,14 @@ /** * External dependencies */ -import { isEmpty, map, reduce } from 'lodash'; +import { isEmpty, map, reduce, kebabCase, isObject } from 'lodash'; import { html as beautifyHtml } from 'js-beautify'; +import classnames from 'classnames'; /** * WordPress dependencies */ -import { Component, createElement, renderToString } from 'element'; +import { Component, createElement, renderToString, cloneElement, Children } from 'element'; /** * Internal dependencies @@ -20,10 +21,11 @@ import { parseBlockAttributes } from './parser'; * static markup to be saved. * * @param {Function|WPComponent} save Save render implementation + * @param {String} blockName Block name * @param {Object} attributes Block attributes * @return {string} Save content */ -export function getSaveContent( save, attributes ) { +export function getSaveContent( save, blockName, attributes ) { let rawContent; if ( save.prototype instanceof Component ) { @@ -37,8 +39,18 @@ export function getSaveContent( save, attributes ) { } } + // Adding a generic classname + const addClassnameToElement = ( element ) => { + if ( ! element || ! isObject( element ) ) { + return element; + } + const className = classnames( element.props.className, `wp-block-${ kebabCase( blockName ) }` ); + return cloneElement( element, { className } ); + }; + const contentWithClassname = Children.map( rawContent, addClassnameToElement ); + // Otherwise, infer as element - return renderToString( rawContent ); + return renderToString( contentWithClassname ); } const escapeDoubleQuotes = value => value.replace( /"/g, '\"' ); @@ -107,7 +119,7 @@ function asNameValuePair( value, key ) { export function serializeBlock( block ) { const blockName = block.name; const blockType = getBlockType( blockName ); - const saveContent = getSaveContent( blockType.save, block.attributes ); + const saveContent = getSaveContent( blockType.save, blockName, block.attributes ); const saveAttributes = getCommentAttributes( block.attributes, parseBlockAttributes( saveContent, blockType ) ); const serializedAttributes = ! isEmpty( saveAttributes ) diff --git a/blocks/api/test/serializer.js b/blocks/api/test/serializer.js index 810cfd9ccc629..0b244eba3f803 100644 --- a/blocks/api/test/serializer.js +++ b/blocks/api/test/serializer.js @@ -26,6 +26,7 @@ describe( 'block serializer', () => { it( 'should return string verbatim', () => { const saved = getSaveContent( ( { attributes } ) => attributes.fruit, + 'core/fruit', { fruit: 'Bananas' } ); @@ -35,10 +36,11 @@ describe( 'block serializer', () => { it( 'should return element as string if save returns element', () => { const saved = getSaveContent( ( { attributes } ) => createElement( 'div', null, attributes.fruit ), + 'core/fruit', { fruit: 'Bananas' } ); - expect( saved ).to.equal( '
Bananas
' ); + expect( saved ).to.equal( '
Bananas
' ); } ); } ); @@ -50,6 +52,7 @@ describe( 'block serializer', () => { return createElement( 'div', null, this.props.attributes.fruit ); } }, + 'core/fruit', { fruit: 'Bananas' } ); @@ -124,7 +127,7 @@ describe( 'block serializer', () => { }, }, ]; - const expectedPostContent = '\n

Ribs & Chicken

\n'; + const expectedPostContent = '\n

Ribs & Chicken

\n'; expect( serialize( blockList ) ).to.eql( expectedPostContent ); } ); diff --git a/blocks/test/fixtures/core-button-center.html b/blocks/test/fixtures/core-button-center.html index b80f97864c293..312b3532e72e7 100644 --- a/blocks/test/fixtures/core-button-center.html +++ b/blocks/test/fixtures/core-button-center.html @@ -1,3 +1,3 @@ -
Help build Gutenberg
+
Help build Gutenberg
diff --git a/blocks/test/fixtures/core-button-center.serialized.html b/blocks/test/fixtures/core-button-center.serialized.html index c360f9e247a91..971bb48cfc038 100644 --- a/blocks/test/fixtures/core-button-center.serialized.html +++ b/blocks/test/fixtures/core-button-center.serialized.html @@ -1,4 +1,4 @@ -
Help build Gutenberg
+
Help build Gutenberg
diff --git a/blocks/test/fixtures/core-code.html b/blocks/test/fixtures/core-code.html index 0c00ab494b2f9..bbfc1b5a80f91 100644 --- a/blocks/test/fixtures/core-code.html +++ b/blocks/test/fixtures/core-code.html @@ -1,5 +1,5 @@ -
export default function MyButton() {
+
export default function MyButton() {
 	return <Button>Click Me!</Button>;
 }
diff --git a/blocks/test/fixtures/core-code.serialized.html b/blocks/test/fixtures/core-code.serialized.html index fbf78a33703c0..f74b38be87235 100644 --- a/blocks/test/fixtures/core-code.serialized.html +++ b/blocks/test/fixtures/core-code.serialized.html @@ -1,5 +1,5 @@ -
export default function MyButton() {
+
export default function MyButton() {
 	return <Button>Click Me!</Button>;
 }
diff --git a/blocks/test/fixtures/core-embed.html b/blocks/test/fixtures/core-embed.html index af8b876de71e0..a22b8055dbb14 100644 --- a/blocks/test/fixtures/core-embed.html +++ b/blocks/test/fixtures/core-embed.html @@ -1,5 +1,5 @@ -
+
https://example.com/
Embedded content from an example URL
diff --git a/blocks/test/fixtures/core-embed.serialized.html b/blocks/test/fixtures/core-embed.serialized.html index b8b1e50e7afef..b79ba1e98afb5 100644 --- a/blocks/test/fixtures/core-embed.serialized.html +++ b/blocks/test/fixtures/core-embed.serialized.html @@ -1,5 +1,5 @@ -
+
https://example.com/
Embedded content from an example URL
diff --git a/blocks/test/fixtures/core-embedanimoto.html b/blocks/test/fixtures/core-embedanimoto.html index 0e464a377f248..0675dad35eb3b 100644 --- a/blocks/test/fixtures/core-embedanimoto.html +++ b/blocks/test/fixtures/core-embedanimoto.html @@ -1,5 +1,5 @@ -
+
https://animoto.com/
Embedded content from animoto
diff --git a/blocks/test/fixtures/core-embedanimoto.serialized.html b/blocks/test/fixtures/core-embedanimoto.serialized.html index e33c67b8256d6..22508b2fc631d 100644 --- a/blocks/test/fixtures/core-embedanimoto.serialized.html +++ b/blocks/test/fixtures/core-embedanimoto.serialized.html @@ -1,5 +1,5 @@ -
+
https://animoto.com/
Embedded content from animoto
diff --git a/blocks/test/fixtures/core-embedcloudup.html b/blocks/test/fixtures/core-embedcloudup.html index 4650c84b4b703..73922f0aecfba 100644 --- a/blocks/test/fixtures/core-embedcloudup.html +++ b/blocks/test/fixtures/core-embedcloudup.html @@ -1,5 +1,5 @@ -
+
https://cloudup.com/
Embedded content from cloudup
diff --git a/blocks/test/fixtures/core-embedcloudup.serialized.html b/blocks/test/fixtures/core-embedcloudup.serialized.html index 02951c1171ec5..5515f4124b29e 100644 --- a/blocks/test/fixtures/core-embedcloudup.serialized.html +++ b/blocks/test/fixtures/core-embedcloudup.serialized.html @@ -1,5 +1,5 @@ -
+
https://cloudup.com/
Embedded content from cloudup
diff --git a/blocks/test/fixtures/core-embedcollegehumor.html b/blocks/test/fixtures/core-embedcollegehumor.html index 5ecdbc3e4dd88..1667705e6b095 100644 --- a/blocks/test/fixtures/core-embedcollegehumor.html +++ b/blocks/test/fixtures/core-embedcollegehumor.html @@ -1,5 +1,5 @@ -
+
https://collegehumor.com/
Embedded content from collegehumor
diff --git a/blocks/test/fixtures/core-embedcollegehumor.serialized.html b/blocks/test/fixtures/core-embedcollegehumor.serialized.html index 82ffd18b7c829..4834b97cdea6b 100644 --- a/blocks/test/fixtures/core-embedcollegehumor.serialized.html +++ b/blocks/test/fixtures/core-embedcollegehumor.serialized.html @@ -1,5 +1,5 @@ -
+
https://collegehumor.com/
Embedded content from collegehumor
diff --git a/blocks/test/fixtures/core-embeddailymotion.html b/blocks/test/fixtures/core-embeddailymotion.html index 08bed7270fe70..2eb58a3647a1b 100644 --- a/blocks/test/fixtures/core-embeddailymotion.html +++ b/blocks/test/fixtures/core-embeddailymotion.html @@ -1,5 +1,5 @@ -
+
https://dailymotion.com/
Embedded content from dailymotion
diff --git a/blocks/test/fixtures/core-embeddailymotion.serialized.html b/blocks/test/fixtures/core-embeddailymotion.serialized.html index 62f55871d1e1f..de05b3c4e45f3 100644 --- a/blocks/test/fixtures/core-embeddailymotion.serialized.html +++ b/blocks/test/fixtures/core-embeddailymotion.serialized.html @@ -1,5 +1,5 @@ -
+
https://dailymotion.com/
Embedded content from dailymotion
diff --git a/blocks/test/fixtures/core-embedfacebook.html b/blocks/test/fixtures/core-embedfacebook.html index 4a5044c13d6cd..36b195fca0219 100644 --- a/blocks/test/fixtures/core-embedfacebook.html +++ b/blocks/test/fixtures/core-embedfacebook.html @@ -1,5 +1,5 @@ -
+
https://facebook.com/
Embedded content from facebook
diff --git a/blocks/test/fixtures/core-embedfacebook.serialized.html b/blocks/test/fixtures/core-embedfacebook.serialized.html index efda5813641da..e4e3b8cd0e2d8 100644 --- a/blocks/test/fixtures/core-embedfacebook.serialized.html +++ b/blocks/test/fixtures/core-embedfacebook.serialized.html @@ -1,5 +1,5 @@ -
+
https://facebook.com/
Embedded content from facebook
diff --git a/blocks/test/fixtures/core-embedflickr.html b/blocks/test/fixtures/core-embedflickr.html index 2325790efcab2..54eba6e3b4d9f 100644 --- a/blocks/test/fixtures/core-embedflickr.html +++ b/blocks/test/fixtures/core-embedflickr.html @@ -1,5 +1,5 @@ -
+
https://flickr.com/
Embedded content from flickr
diff --git a/blocks/test/fixtures/core-embedflickr.serialized.html b/blocks/test/fixtures/core-embedflickr.serialized.html index 4d86c30f5b881..7fab45c0d0032 100644 --- a/blocks/test/fixtures/core-embedflickr.serialized.html +++ b/blocks/test/fixtures/core-embedflickr.serialized.html @@ -1,5 +1,5 @@ -
+
https://flickr.com/
Embedded content from flickr
diff --git a/blocks/test/fixtures/core-embedfunnyordie.html b/blocks/test/fixtures/core-embedfunnyordie.html index 67e845a743e95..09c99b96ce3ab 100644 --- a/blocks/test/fixtures/core-embedfunnyordie.html +++ b/blocks/test/fixtures/core-embedfunnyordie.html @@ -1,5 +1,5 @@ -
+
https://funnyordie.com/
Embedded content from funnyordie
diff --git a/blocks/test/fixtures/core-embedfunnyordie.serialized.html b/blocks/test/fixtures/core-embedfunnyordie.serialized.html index bba227b1c1956..a8a9aa567f8aa 100644 --- a/blocks/test/fixtures/core-embedfunnyordie.serialized.html +++ b/blocks/test/fixtures/core-embedfunnyordie.serialized.html @@ -1,5 +1,5 @@ -
+
https://funnyordie.com/
Embedded content from funnyordie
diff --git a/blocks/test/fixtures/core-embedhulu.html b/blocks/test/fixtures/core-embedhulu.html index 749b3ecb99aee..fb19c1c5d5151 100644 --- a/blocks/test/fixtures/core-embedhulu.html +++ b/blocks/test/fixtures/core-embedhulu.html @@ -1,5 +1,5 @@ -
+
https://hulu.com/
Embedded content from hulu
diff --git a/blocks/test/fixtures/core-embedhulu.serialized.html b/blocks/test/fixtures/core-embedhulu.serialized.html index c9c5b31537a69..51211ebfde4a2 100644 --- a/blocks/test/fixtures/core-embedhulu.serialized.html +++ b/blocks/test/fixtures/core-embedhulu.serialized.html @@ -1,5 +1,5 @@ -
+
https://hulu.com/
Embedded content from hulu
diff --git a/blocks/test/fixtures/core-embedimgur.html b/blocks/test/fixtures/core-embedimgur.html index 93f03e68d48d8..cf9ce949285e7 100644 --- a/blocks/test/fixtures/core-embedimgur.html +++ b/blocks/test/fixtures/core-embedimgur.html @@ -1,5 +1,5 @@ -
+
https://imgur.com/
Embedded content from imgur
diff --git a/blocks/test/fixtures/core-embedimgur.serialized.html b/blocks/test/fixtures/core-embedimgur.serialized.html index e1e3510c97eab..a22ec4622e057 100644 --- a/blocks/test/fixtures/core-embedimgur.serialized.html +++ b/blocks/test/fixtures/core-embedimgur.serialized.html @@ -1,5 +1,5 @@ -
+
https://imgur.com/
Embedded content from imgur
diff --git a/blocks/test/fixtures/core-embedinstagram.html b/blocks/test/fixtures/core-embedinstagram.html index 12dc0d1ec0853..b74d60f360a33 100644 --- a/blocks/test/fixtures/core-embedinstagram.html +++ b/blocks/test/fixtures/core-embedinstagram.html @@ -1,5 +1,5 @@ -
+
https://instagram.com/
Embedded content from instagram
diff --git a/blocks/test/fixtures/core-embedinstagram.serialized.html b/blocks/test/fixtures/core-embedinstagram.serialized.html index 018a38ab8d52b..789314d81df37 100644 --- a/blocks/test/fixtures/core-embedinstagram.serialized.html +++ b/blocks/test/fixtures/core-embedinstagram.serialized.html @@ -1,5 +1,5 @@ -
+
https://instagram.com/
Embedded content from instagram
diff --git a/blocks/test/fixtures/core-embedissuu.html b/blocks/test/fixtures/core-embedissuu.html index 6849278719bc4..537bed06aef59 100644 --- a/blocks/test/fixtures/core-embedissuu.html +++ b/blocks/test/fixtures/core-embedissuu.html @@ -1,5 +1,5 @@ -
+
https://issuu.com/
Embedded content from issuu
diff --git a/blocks/test/fixtures/core-embedissuu.serialized.html b/blocks/test/fixtures/core-embedissuu.serialized.html index 18903978bd6e1..09fa6af235cff 100644 --- a/blocks/test/fixtures/core-embedissuu.serialized.html +++ b/blocks/test/fixtures/core-embedissuu.serialized.html @@ -1,5 +1,5 @@ -
+
https://issuu.com/
Embedded content from issuu
diff --git a/blocks/test/fixtures/core-embedkickstarter.html b/blocks/test/fixtures/core-embedkickstarter.html index dbd11a91fe39b..ca7a645723b3d 100644 --- a/blocks/test/fixtures/core-embedkickstarter.html +++ b/blocks/test/fixtures/core-embedkickstarter.html @@ -1,5 +1,5 @@ -
+
https://kickstarter.com/
Embedded content from kickstarter
diff --git a/blocks/test/fixtures/core-embedkickstarter.serialized.html b/blocks/test/fixtures/core-embedkickstarter.serialized.html index 600c019a80342..a3820965b1c84 100644 --- a/blocks/test/fixtures/core-embedkickstarter.serialized.html +++ b/blocks/test/fixtures/core-embedkickstarter.serialized.html @@ -1,5 +1,5 @@ -
+
https://kickstarter.com/
Embedded content from kickstarter
diff --git a/blocks/test/fixtures/core-embedmeetupcom.html b/blocks/test/fixtures/core-embedmeetupcom.html index f72f0acfcea7e..e70d7742dc7fb 100644 --- a/blocks/test/fixtures/core-embedmeetupcom.html +++ b/blocks/test/fixtures/core-embedmeetupcom.html @@ -1,5 +1,5 @@ -
+
https://meetupcom.com/
Embedded content from meetupcom
diff --git a/blocks/test/fixtures/core-embedmeetupcom.serialized.html b/blocks/test/fixtures/core-embedmeetupcom.serialized.html index c271a0550b38c..8d10823d4308c 100644 --- a/blocks/test/fixtures/core-embedmeetupcom.serialized.html +++ b/blocks/test/fixtures/core-embedmeetupcom.serialized.html @@ -1,5 +1,5 @@ -
+
https://meetupcom.com/
Embedded content from meetupcom
diff --git a/blocks/test/fixtures/core-embedmixcloud.html b/blocks/test/fixtures/core-embedmixcloud.html index bf79ac8537924..3df7723847355 100644 --- a/blocks/test/fixtures/core-embedmixcloud.html +++ b/blocks/test/fixtures/core-embedmixcloud.html @@ -1,5 +1,5 @@ -
+
https://mixcloud.com/
Embedded content from mixcloud
diff --git a/blocks/test/fixtures/core-embedmixcloud.serialized.html b/blocks/test/fixtures/core-embedmixcloud.serialized.html index dd53c339d93a0..25c977a86e271 100644 --- a/blocks/test/fixtures/core-embedmixcloud.serialized.html +++ b/blocks/test/fixtures/core-embedmixcloud.serialized.html @@ -1,5 +1,5 @@ -
+
https://mixcloud.com/
Embedded content from mixcloud
diff --git a/blocks/test/fixtures/core-embedphotobucket.html b/blocks/test/fixtures/core-embedphotobucket.html index ba8170950c372..cd884bef1ce07 100644 --- a/blocks/test/fixtures/core-embedphotobucket.html +++ b/blocks/test/fixtures/core-embedphotobucket.html @@ -1,5 +1,5 @@ -
+
https://photobucket.com/
Embedded content from photobucket
diff --git a/blocks/test/fixtures/core-embedphotobucket.serialized.html b/blocks/test/fixtures/core-embedphotobucket.serialized.html index e2631ab04ceee..ddf81880fdf2e 100644 --- a/blocks/test/fixtures/core-embedphotobucket.serialized.html +++ b/blocks/test/fixtures/core-embedphotobucket.serialized.html @@ -1,5 +1,5 @@ -
+
https://photobucket.com/
Embedded content from photobucket
diff --git a/blocks/test/fixtures/core-embedpolldaddy.html b/blocks/test/fixtures/core-embedpolldaddy.html index 4176efd62628d..508aba1c396fe 100644 --- a/blocks/test/fixtures/core-embedpolldaddy.html +++ b/blocks/test/fixtures/core-embedpolldaddy.html @@ -1,5 +1,5 @@ -
+
https://polldaddy.com/
Embedded content from polldaddy
diff --git a/blocks/test/fixtures/core-embedpolldaddy.serialized.html b/blocks/test/fixtures/core-embedpolldaddy.serialized.html index 20f6eba0732f3..4d8cbb5f91af0 100644 --- a/blocks/test/fixtures/core-embedpolldaddy.serialized.html +++ b/blocks/test/fixtures/core-embedpolldaddy.serialized.html @@ -1,5 +1,5 @@ -
+
https://polldaddy.com/
Embedded content from polldaddy
diff --git a/blocks/test/fixtures/core-embedreddit.html b/blocks/test/fixtures/core-embedreddit.html index 3537909ad8430..2b083415c3b61 100644 --- a/blocks/test/fixtures/core-embedreddit.html +++ b/blocks/test/fixtures/core-embedreddit.html @@ -1,5 +1,5 @@ -
+
https://reddit.com/
Embedded content from reddit
diff --git a/blocks/test/fixtures/core-embedreddit.serialized.html b/blocks/test/fixtures/core-embedreddit.serialized.html index 8fda9380fb209..ec9e894c51185 100644 --- a/blocks/test/fixtures/core-embedreddit.serialized.html +++ b/blocks/test/fixtures/core-embedreddit.serialized.html @@ -1,5 +1,5 @@ -
+
https://reddit.com/
Embedded content from reddit
diff --git a/blocks/test/fixtures/core-embedreverbnation.html b/blocks/test/fixtures/core-embedreverbnation.html index 3e03c3404f757..36923f77f1035 100644 --- a/blocks/test/fixtures/core-embedreverbnation.html +++ b/blocks/test/fixtures/core-embedreverbnation.html @@ -1,5 +1,5 @@ -
+
https://reverbnation.com/
Embedded content from reverbnation
diff --git a/blocks/test/fixtures/core-embedreverbnation.serialized.html b/blocks/test/fixtures/core-embedreverbnation.serialized.html index 3f5686dad96cf..7482ef1e1604b 100644 --- a/blocks/test/fixtures/core-embedreverbnation.serialized.html +++ b/blocks/test/fixtures/core-embedreverbnation.serialized.html @@ -1,5 +1,5 @@ -
+
https://reverbnation.com/
Embedded content from reverbnation
diff --git a/blocks/test/fixtures/core-embedscreencast.html b/blocks/test/fixtures/core-embedscreencast.html index 75e7990c480f7..5f7a10844a7ce 100644 --- a/blocks/test/fixtures/core-embedscreencast.html +++ b/blocks/test/fixtures/core-embedscreencast.html @@ -1,5 +1,5 @@ -
+
https://screencast.com/
Embedded content from screencast
diff --git a/blocks/test/fixtures/core-embedscreencast.serialized.html b/blocks/test/fixtures/core-embedscreencast.serialized.html index 2d6b546863769..efea68a484219 100644 --- a/blocks/test/fixtures/core-embedscreencast.serialized.html +++ b/blocks/test/fixtures/core-embedscreencast.serialized.html @@ -1,5 +1,5 @@ -
+
https://screencast.com/
Embedded content from screencast
diff --git a/blocks/test/fixtures/core-embedscribd.html b/blocks/test/fixtures/core-embedscribd.html index 4971e8c943842..a4872f0920b6b 100644 --- a/blocks/test/fixtures/core-embedscribd.html +++ b/blocks/test/fixtures/core-embedscribd.html @@ -1,5 +1,5 @@ -
+
https://scribd.com/
Embedded content from scribd
diff --git a/blocks/test/fixtures/core-embedscribd.serialized.html b/blocks/test/fixtures/core-embedscribd.serialized.html index 06069125228bd..d1a1fb5e94167 100644 --- a/blocks/test/fixtures/core-embedscribd.serialized.html +++ b/blocks/test/fixtures/core-embedscribd.serialized.html @@ -1,5 +1,5 @@ -
+
https://scribd.com/
Embedded content from scribd
diff --git a/blocks/test/fixtures/core-embedslideshare.html b/blocks/test/fixtures/core-embedslideshare.html index abd33acdf7c46..ae29ae9b10857 100644 --- a/blocks/test/fixtures/core-embedslideshare.html +++ b/blocks/test/fixtures/core-embedslideshare.html @@ -1,5 +1,5 @@ -
+
https://slideshare.com/
Embedded content from slideshare
diff --git a/blocks/test/fixtures/core-embedslideshare.serialized.html b/blocks/test/fixtures/core-embedslideshare.serialized.html index 8184fc98e5a1a..89ad51a722de8 100644 --- a/blocks/test/fixtures/core-embedslideshare.serialized.html +++ b/blocks/test/fixtures/core-embedslideshare.serialized.html @@ -1,5 +1,5 @@ -
+
https://slideshare.com/
Embedded content from slideshare
diff --git a/blocks/test/fixtures/core-embedsmugmug.html b/blocks/test/fixtures/core-embedsmugmug.html index 7dc99c1cb7dfb..a778508749c0a 100644 --- a/blocks/test/fixtures/core-embedsmugmug.html +++ b/blocks/test/fixtures/core-embedsmugmug.html @@ -1,5 +1,5 @@ -
+
https://smugmug.com/
Embedded content from smugmug
diff --git a/blocks/test/fixtures/core-embedsmugmug.serialized.html b/blocks/test/fixtures/core-embedsmugmug.serialized.html index 4755f4de1a2c5..ae83583b91075 100644 --- a/blocks/test/fixtures/core-embedsmugmug.serialized.html +++ b/blocks/test/fixtures/core-embedsmugmug.serialized.html @@ -1,5 +1,5 @@ -
+
https://smugmug.com/
Embedded content from smugmug
diff --git a/blocks/test/fixtures/core-embedsoundcloud.html b/blocks/test/fixtures/core-embedsoundcloud.html index c02c19b249a0b..3bc156f303e82 100644 --- a/blocks/test/fixtures/core-embedsoundcloud.html +++ b/blocks/test/fixtures/core-embedsoundcloud.html @@ -1,5 +1,5 @@ -
+
https://soundcloud.com/
Embedded content from soundcloud
diff --git a/blocks/test/fixtures/core-embedsoundcloud.serialized.html b/blocks/test/fixtures/core-embedsoundcloud.serialized.html index 70688f2cad848..0edbe298420f7 100644 --- a/blocks/test/fixtures/core-embedsoundcloud.serialized.html +++ b/blocks/test/fixtures/core-embedsoundcloud.serialized.html @@ -1,5 +1,5 @@ -
+
https://soundcloud.com/
Embedded content from soundcloud
diff --git a/blocks/test/fixtures/core-embedspeaker.html b/blocks/test/fixtures/core-embedspeaker.html index a7a9332fff5d2..77aec2c0c2d99 100644 --- a/blocks/test/fixtures/core-embedspeaker.html +++ b/blocks/test/fixtures/core-embedspeaker.html @@ -1,5 +1,5 @@ -
+
https://speaker.com/
Embedded content from speaker
diff --git a/blocks/test/fixtures/core-embedspeaker.serialized.html b/blocks/test/fixtures/core-embedspeaker.serialized.html index 77b6efdd62940..5c880c62d7589 100644 --- a/blocks/test/fixtures/core-embedspeaker.serialized.html +++ b/blocks/test/fixtures/core-embedspeaker.serialized.html @@ -1,5 +1,5 @@ -
+
https://speaker.com/
Embedded content from speaker
diff --git a/blocks/test/fixtures/core-embedspotify.html b/blocks/test/fixtures/core-embedspotify.html index bfe67cb9034fc..cae29199f19c1 100644 --- a/blocks/test/fixtures/core-embedspotify.html +++ b/blocks/test/fixtures/core-embedspotify.html @@ -1,5 +1,5 @@ -
+
https://spotify.com/
Embedded content from spotify
diff --git a/blocks/test/fixtures/core-embedspotify.serialized.html b/blocks/test/fixtures/core-embedspotify.serialized.html index 8e88da9f4e3a2..13ca4f3798771 100644 --- a/blocks/test/fixtures/core-embedspotify.serialized.html +++ b/blocks/test/fixtures/core-embedspotify.serialized.html @@ -1,5 +1,5 @@ -
+
https://spotify.com/
Embedded content from spotify
diff --git a/blocks/test/fixtures/core-embedted.html b/blocks/test/fixtures/core-embedted.html index eb58f0c2c3949..2546b6d74bd31 100644 --- a/blocks/test/fixtures/core-embedted.html +++ b/blocks/test/fixtures/core-embedted.html @@ -1,5 +1,5 @@ -
+
https://ted.com/
Embedded content from ted
diff --git a/blocks/test/fixtures/core-embedted.serialized.html b/blocks/test/fixtures/core-embedted.serialized.html index 5a9d51536f5da..638848a4cada2 100644 --- a/blocks/test/fixtures/core-embedted.serialized.html +++ b/blocks/test/fixtures/core-embedted.serialized.html @@ -1,5 +1,5 @@ -
+
https://ted.com/
Embedded content from ted
diff --git a/blocks/test/fixtures/core-embedtumblr.html b/blocks/test/fixtures/core-embedtumblr.html index ee07d48e887ba..0a1fc1a1292bb 100644 --- a/blocks/test/fixtures/core-embedtumblr.html +++ b/blocks/test/fixtures/core-embedtumblr.html @@ -1,5 +1,5 @@ -
+
https://tumblr.com/
Embedded content from tumblr
diff --git a/blocks/test/fixtures/core-embedtumblr.serialized.html b/blocks/test/fixtures/core-embedtumblr.serialized.html index 8f1da3fb2e4d9..b31aa5ad8714b 100644 --- a/blocks/test/fixtures/core-embedtumblr.serialized.html +++ b/blocks/test/fixtures/core-embedtumblr.serialized.html @@ -1,5 +1,5 @@ -
+
https://tumblr.com/
Embedded content from tumblr
diff --git a/blocks/test/fixtures/core-embedtwitter.html b/blocks/test/fixtures/core-embedtwitter.html index 807a6bfd27604..14604151a39ea 100644 --- a/blocks/test/fixtures/core-embedtwitter.html +++ b/blocks/test/fixtures/core-embedtwitter.html @@ -1,5 +1,5 @@ -
+
https://twitter.com/automattic
We are Automattic
diff --git a/blocks/test/fixtures/core-embedtwitter.serialized.html b/blocks/test/fixtures/core-embedtwitter.serialized.html index bc214e661e01e..d959f9f76912b 100644 --- a/blocks/test/fixtures/core-embedtwitter.serialized.html +++ b/blocks/test/fixtures/core-embedtwitter.serialized.html @@ -1,5 +1,5 @@ -
+
https://twitter.com/automattic
We are Automattic
diff --git a/blocks/test/fixtures/core-embedvideopress.html b/blocks/test/fixtures/core-embedvideopress.html index ba2ff6bdc2e51..852ca78e203f0 100644 --- a/blocks/test/fixtures/core-embedvideopress.html +++ b/blocks/test/fixtures/core-embedvideopress.html @@ -1,5 +1,5 @@ -
+
https://videopress.com/
Embedded content from videopress
diff --git a/blocks/test/fixtures/core-embedvideopress.serialized.html b/blocks/test/fixtures/core-embedvideopress.serialized.html index 571972d53ff4d..5ad3deaeae761 100644 --- a/blocks/test/fixtures/core-embedvideopress.serialized.html +++ b/blocks/test/fixtures/core-embedvideopress.serialized.html @@ -1,5 +1,5 @@ -
+
https://videopress.com/
Embedded content from videopress
diff --git a/blocks/test/fixtures/core-embedvimeo.html b/blocks/test/fixtures/core-embedvimeo.html index 81b4698f749c2..3e3ecf54288a9 100644 --- a/blocks/test/fixtures/core-embedvimeo.html +++ b/blocks/test/fixtures/core-embedvimeo.html @@ -1,5 +1,5 @@ -
+
https://vimeo.com/
Embedded content from vimeo
diff --git a/blocks/test/fixtures/core-embedvimeo.serialized.html b/blocks/test/fixtures/core-embedvimeo.serialized.html index eb1522a937aea..c23c39d52ad4f 100644 --- a/blocks/test/fixtures/core-embedvimeo.serialized.html +++ b/blocks/test/fixtures/core-embedvimeo.serialized.html @@ -1,5 +1,5 @@ -
+
https://vimeo.com/
Embedded content from vimeo
diff --git a/blocks/test/fixtures/core-embedvine.html b/blocks/test/fixtures/core-embedvine.html index b70558a5fc77b..e7ed0d2f98847 100644 --- a/blocks/test/fixtures/core-embedvine.html +++ b/blocks/test/fixtures/core-embedvine.html @@ -1,5 +1,5 @@ -
+
https://vine.com/
Embedded content from vine
diff --git a/blocks/test/fixtures/core-embedvine.serialized.html b/blocks/test/fixtures/core-embedvine.serialized.html index df9496fb94081..23877d1ece71c 100644 --- a/blocks/test/fixtures/core-embedvine.serialized.html +++ b/blocks/test/fixtures/core-embedvine.serialized.html @@ -1,5 +1,5 @@ -
+
https://vine.com/
Embedded content from vine
diff --git a/blocks/test/fixtures/core-embedwordpress.html b/blocks/test/fixtures/core-embedwordpress.html index accd979b51f83..e16386905c58a 100644 --- a/blocks/test/fixtures/core-embedwordpress.html +++ b/blocks/test/fixtures/core-embedwordpress.html @@ -1,5 +1,5 @@ -
+
https://wordpress.com/
Embedded content from WordPress
diff --git a/blocks/test/fixtures/core-embedwordpress.serialized.html b/blocks/test/fixtures/core-embedwordpress.serialized.html index 0905c1b166b45..9748cc91b9e3b 100644 --- a/blocks/test/fixtures/core-embedwordpress.serialized.html +++ b/blocks/test/fixtures/core-embedwordpress.serialized.html @@ -1,5 +1,5 @@ -
+
https://wordpress.com/
Embedded content from WordPress
diff --git a/blocks/test/fixtures/core-embedwordpresstv.html b/blocks/test/fixtures/core-embedwordpresstv.html index eca3877f5ced8..3675fe56b6f5d 100644 --- a/blocks/test/fixtures/core-embedwordpresstv.html +++ b/blocks/test/fixtures/core-embedwordpresstv.html @@ -1,5 +1,5 @@ -
+
https://wordpresstv.com/
Embedded content from wordpresstv
diff --git a/blocks/test/fixtures/core-embedwordpresstv.serialized.html b/blocks/test/fixtures/core-embedwordpresstv.serialized.html index bc6c773f16293..a906d563357c0 100644 --- a/blocks/test/fixtures/core-embedwordpresstv.serialized.html +++ b/blocks/test/fixtures/core-embedwordpresstv.serialized.html @@ -1,5 +1,5 @@ -
+
https://wordpresstv.com/
Embedded content from wordpresstv
diff --git a/blocks/test/fixtures/core-embedyoutube.html b/blocks/test/fixtures/core-embedyoutube.html index e0832c00589d2..b97d4fa9c7a34 100644 --- a/blocks/test/fixtures/core-embedyoutube.html +++ b/blocks/test/fixtures/core-embedyoutube.html @@ -1,5 +1,5 @@ -
+
https://youtube.com/
Embedded content from youtube
diff --git a/blocks/test/fixtures/core-embedyoutube.serialized.html b/blocks/test/fixtures/core-embedyoutube.serialized.html index 02fa086d489e7..f5ed0ba74ddf9 100644 --- a/blocks/test/fixtures/core-embedyoutube.serialized.html +++ b/blocks/test/fixtures/core-embedyoutube.serialized.html @@ -1,5 +1,5 @@ -
+
https://youtube.com/
Embedded content from youtube
diff --git a/blocks/test/fixtures/core-freeform.serialized.html b/blocks/test/fixtures/core-freeform.serialized.html index d30114895dd4c..e603f3513a0dd 100644 --- a/blocks/test/fixtures/core-freeform.serialized.html +++ b/blocks/test/fixtures/core-freeform.serialized.html @@ -1,6 +1,6 @@ Testing freeform block with some -
+
HTML content
diff --git a/blocks/test/fixtures/core-gallery.html b/blocks/test/fixtures/core-gallery.html index 523a6732dd959..d313804cbb125 100644 --- a/blocks/test/fixtures/core-gallery.html +++ b/blocks/test/fixtures/core-gallery.html @@ -1,5 +1,5 @@ -