<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[43752] branches/5.0: Blocks: Parse blocks when displaying posts.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/43752">43752</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/43752","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>pento</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2018-10-18 11:53:49 +0000 (Thu, 18 Oct 2018)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Blocks: Parse blocks when displaying posts.

Posts containing blocks are now correctly handled when displaying on the front end, including dynamic blocks and nested blocks.

See <a href="https://core.trac.wordpress.org/ticket/45109">#45109</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branches50srcwpincludesblocksphp">branches/5.0/src/wp-includes/blocks.php</a></li>
<li><a href="#branches50srcwpincludesclasswpblockparserphp">branches/5.0/src/wp-includes/class-wp-block-parser.php</a></li>
<li><a href="#branches50srcwpincludesdefaultfiltersphp">branches/5.0/src/wp-includes/default-filters.php</a></li>
<li><a href="#branches50srcwpincludesformattingphp">branches/5.0/src/wp-includes/formatting.php</a></li>
<li><a href="#branches50srcwpsettingsphp">branches/5.0/src/wp-settings.php</a></li>
<li><a href="#branches50testsphpunitdatablocksdoblocksexpectedhtml">branches/5.0/tests/phpunit/data/blocks/do-blocks-expected.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__columnparsedjson">branches/5.0/tests/phpunit/data/blocks/fixtures/core__column.parsed.json</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__columnsparsedjson">branches/5.0/tests/phpunit/data/blocks/fixtures/core__columns.parsed.json</a></li>
<li><a href="#branches50testsphpunitincludesfunctionsphp">branches/5.0/tests/phpunit/includes/functions.php</a></li>
<li><a href="#branches50testsphpunittestsblocksblockparserphp">branches/5.0/tests/phpunit/tests/blocks/block-parser.php</a></li>
<li><a href="#branches50toolswebpackpackagesjs">branches/5.0/tools/webpack/packages.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>branches/5.0/src/wp-includes/blocks/</li>
<li><a href="#branches50srcwpincludesblocksarchivesphp">branches/5.0/src/wp-includes/blocks/archives.php</a></li>
<li><a href="#branches50srcwpincludesblocksblockphp">branches/5.0/src/wp-includes/blocks/block.php</a></li>
<li><a href="#branches50srcwpincludesblockscategoriesphp">branches/5.0/src/wp-includes/blocks/categories.php</a></li>
<li><a href="#branches50srcwpincludesblockslatestcommentsphp">branches/5.0/src/wp-includes/blocks/latest-comments.php</a></li>
<li><a href="#branches50srcwpincludesblockslatestpostsphp">branches/5.0/src/wp-includes/blocks/latest-posts.php</a></li>
<li><a href="#branches50srcwpincludesblocksshortcodephp">branches/5.0/src/wp-includes/blocks/shortcode.php</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__4invalidstartingletterserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__4-invalid-starting-letter.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__archivesserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__archives.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__archives__showPostCountsserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__archives__showPostCounts.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__audioserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__audio.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__blockserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__block.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__button__centerserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__button__center.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__categoriesserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__categories.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__codeserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__code.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__columnserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__column.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__columnsserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__columns.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__coverimageserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__cover-image.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__embedserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__embed.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__file__newwindowserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__file__new-window.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__file__nodownloadbuttonserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__file__no-download-button.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__file__notextlinkserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__file__no-text-link.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__freeformserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__freeform.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__freeform__undelimitedserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__freeform__undelimited.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__galleryserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__gallery.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__gallery__columnsserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__gallery__columns.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__heading__h2emserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__heading__h2-em.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__heading__h2serverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__heading__h2.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__htmlserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__html.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__imageserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__image.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__image__attachmentlinkserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__image__attachment-link.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__image__centercaptionserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__image__center-caption.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__image__customlinkserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__image__custom-link.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__image__medialinkserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__image__media-link.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__invalidCapitalsserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__invalid-Capitals.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__invalidspecialserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__invalid-special.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__latestcommentsserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__latest-comments.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__latestpostsserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__latest-posts.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__latestposts__displayPostDateserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__latest-posts__displayPostDate.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__list__ulserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__list__ul.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__missingserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__missing.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__moreserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__more.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__more__customtextteaserserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__more__custom-text-teaser.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__nextpageserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__nextpage.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__paragraph__alignrightserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__paragraph__align-right.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__paragraph__deprecatedserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__paragraph__deprecated.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__preformattedserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__preformatted.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__pullquoteserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__pullquote.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__pullquote__multiparagraphserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__pullquote__multi-paragraph.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__quote__style1serverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__quote__style-1.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__quote__style2serverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__quote__style-2.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__separatorserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__separator.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__shortcodeserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__shortcode.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__spacerserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__spacer.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__subheadserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__subhead.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__tableserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__table.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__textcolumnsserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__text-columns.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__text__convertstoparagraphserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__text__converts-to-paragraph.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__verseserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__verse.server.html</a></li>
<li><a href="#branches50testsphpunitdatablocksfixturescore__videoserverhtml">branches/5.0/tests/phpunit/data/blocks/fixtures/core__video.server.html</a></li>
<li><a href="#branches50testsphpunittestsblocksrenderphp">branches/5.0/tests/phpunit/tests/blocks/render.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branches50srcwpincludesblocksarchivesphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/src/wp-includes/blocks/archives.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/src/wp-includes/blocks/archives.php                          (rev 0)
+++ branches/5.0/src/wp-includes/blocks/archives.php    2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,143 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Server-side rendering of the `core/archives` block.
+ *
+ * @package gutenberg
+ */
+
+/**
+ * Renders the `core/archives` block on server.
+ *
+ * @see WP_Widget_Archives
+ *
+ * @param array $attributes The block attributes.
+ *
+ * @return string Returns the post content with archives added.
+ */
+function render_block_core_archives( $attributes ) {
+       $show_post_count = ! empty( $attributes['showPostCounts'] );
+
+       $class = 'wp-block-archives';
+
+       if ( isset( $attributes['align'] ) ) {
+               $class .= " align{$attributes['align']}";
+       }
+
+       if ( isset( $attributes['className'] ) ) {
+               $class .= " {$attributes['className']}";
+       }
+
+       if ( ! empty( $attributes['displayAsDropdown'] ) ) {
+
+               $dropdown_id = esc_attr( uniqid( 'wp-block-archives-' ) );
+               $title       = __( 'Archives', 'gutenberg' );
+
+               /** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */
+               $dropdown_args = apply_filters(
+                       'widget_archives_dropdown_args',
+                       array(
+                               'type'            => 'monthly',
+                               'format'          => 'option',
+                               'show_post_count' => $show_post_count,
+                       )
+               );
+
+               $dropdown_args['echo'] = 0;
+
+               $archives = wp_get_archives( $dropdown_args );
+
+               switch ( $dropdown_args['type'] ) {
+                       case 'yearly':
+                               $label = __( 'Select Year', 'gutenberg' );
+                               break;
+                       case 'monthly':
+                               $label = __( 'Select Month', 'gutenberg' );
+                               break;
+                       case 'daily':
+                               $label = __( 'Select Day', 'gutenberg' );
+                               break;
+                       case 'weekly':
+                               $label = __( 'Select Week', 'gutenberg' );
+                               break;
+                       default:
+                               $label = __( 'Select Post', 'gutenberg' );
+                               break;
+               }
+
+               $label = esc_attr( $label );
+
+               $block_content = '<label class="screen-reader-text" for="' . $dropdown_id . '">' . $title . '</label>
+       <select id="' . $dropdown_id . '" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
+       <option value="">' . $label . '</option>' . $archives . '</select>';
+
+               $block_content = sprintf(
+                       '<div class="%1$s">%2$s</div>',
+                       esc_attr( $class ),
+                       $block_content
+               );
+       } else {
+
+               /** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */
+               $archives_args = apply_filters(
+                       'widget_archives_args',
+                       array(
+                               'type'            => 'monthly',
+                               'show_post_count' => $show_post_count,
+                       )
+               );
+
+               $archives_args['echo'] = 0;
+
+               $archives = wp_get_archives( $archives_args );
+
+               $classnames = esc_attr( $class );
+
+               if ( empty( $archives ) ) {
+
+                       $block_content = sprintf(
+                               '<div class="%1$s">%2$s</div>',
+                               $classnames,
+                               __( 'No archives to show.', 'gutenberg' )
+                       );
+               } else {
+
+                       $block_content = sprintf(
+                               '<ul class="%1$s">%2$s</ul>',
+                               $classnames,
+                               $archives
+                       );
+               }
+       }
+
+       return $block_content;
+}
+
+/**
+ * Register archives block.
+ */
+function register_block_core_archives() {
+       register_block_type(
+               'core/archives',
+               array(
+                       'attributes'      => array(
+                               'align'             => array(
+                                       'type' => 'string',
+                               ),
+                               'className'         => array(
+                                       'type' => 'string',
+                               ),
+                               'displayAsDropdown' => array(
+                                       'type'    => 'boolean',
+                                       'default' => false,
+                               ),
+                               'showPostCounts'    => array(
+                                       'type'    => 'boolean',
+                                       'default' => false,
+                               ),
+                       ),
+                       'render_callback' => 'render_block_core_archives',
+               )
+       );
+}
+
+add_action( 'init', 'register_block_core_archives' );
</ins></span></pre></div>
<a id="branches50srcwpincludesblocksblockphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/src/wp-includes/blocks/block.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/src/wp-includes/blocks/block.php                             (rev 0)
+++ branches/5.0/src/wp-includes/blocks/block.php       2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,39 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Server-side rendering of the `core/block` block.
+ *
+ * @package gutenberg
+ */
+
+/**
+ * Renders the `core/block` block on server.
+ *
+ * @param array $attributes The block attributes.
+ *
+ * @return string Rendered HTML of the referenced block.
+ */
+function render_block_core_block( $attributes ) {
+       if ( empty( $attributes['ref'] ) ) {
+               return '';
+       }
+
+       $reusable_block = get_post( $attributes['ref'] );
+       if ( ! $reusable_block || 'wp_block' !== $reusable_block->post_type ) {
+               return '';
+       }
+
+       return do_blocks( $reusable_block->post_content );
+}
+
+register_block_type(
+       'core/block',
+       array(
+               'attributes'      => array(
+                       'ref' => array(
+                               'type' => 'number',
+                       ),
+               ),
+
+               'render_callback' => 'render_block_core_block',
+       )
+);
</ins></span></pre></div>
<a id="branches50srcwpincludesblockscategoriesphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/src/wp-includes/blocks/categories.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/src/wp-includes/blocks/categories.php                                (rev 0)
+++ branches/5.0/src/wp-includes/blocks/categories.php  2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,103 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Server-side rendering of the `core/categories` block.
+ *
+ * @package gutenberg
+ */
+
+/**
+ * Renders the `core/categories` block on server.
+ *
+ * @param array $attributes The block attributes.
+ *
+ * @return string Returns the categories list/dropdown markup.
+ */
+function render_block_core_categories( $attributes ) {
+       static $block_id = 0;
+       $block_id++;
+
+       $align = 'center';
+       if ( isset( $attributes['align'] ) && in_array( $attributes['align'], array( 'left', 'right', 'full' ), true ) ) {
+               $align = $attributes['align'];
+       }
+
+       $args = array(
+               'echo'         => false,
+               'hierarchical' => ! empty( $attributes['showHierarchy'] ),
+               'orderby'      => 'name',
+               'show_count'   => ! empty( $attributes['showPostCounts'] ),
+               'title_li'     => '',
+       );
+
+       if ( ! empty( $attributes['displayAsDropdown'] ) ) {
+               $id                       = 'wp-block-categories-' . $block_id;
+               $args['id']               = $id;
+               $args['show_option_none'] = __( 'Select Category', 'gutenberg' );
+               $wrapper_markup           = '<div class="%1$s">%2$s</div>';
+               $items_markup             = wp_dropdown_categories( $args );
+               $type                     = 'dropdown';
+
+               if ( ! is_admin() ) {
+                       $wrapper_markup .= build_dropdown_script_block_core_categories( $id );
+               }
+       } else {
+               $wrapper_markup = '<ul class="%1$s">%2$s</ul>';
+               $items_markup   = wp_list_categories( $args );
+               $type           = 'list';
+       }
+
+       $class = "wp-block-categories wp-block-categories-{$type} align{$align}";
+
+       if ( isset( $attributes['className'] ) ) {
+               $class .= ' ' . $attributes['className'];
+       }
+
+       $block_content = sprintf(
+               $wrapper_markup,
+               esc_attr( $class ),
+               $items_markup
+       );
+
+       return $block_content;
+}
+
+/**
+ * Generates the inline script for a categories dropdown field.
+ *
+ * @param string $dropdown_id ID of the dropdown field.
+ *
+ * @return string Returns the dropdown onChange redirection script.
+ */
+function build_dropdown_script_block_core_categories( $dropdown_id ) {
+       ob_start();
+       ?>
+       <script type='text/javascript'>
+       /* <![CDATA[ */
+       (function() {
+               var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' );
+               function onCatChange() {
+                       if ( dropdown.options[ dropdown.selectedIndex ].value > 0 ) {
+                               location.href = "<?php echo home_url(); ?>/?cat=" + dropdown.options[ dropdown.selectedIndex ].value;
+                       }
+               }
+               dropdown.onchange = onCatChange;
+       })();
+       /* ]]> */
+       </script>
+       <?php
+       return ob_get_clean();
+}
+
+/**
+ * Registers the `core/categories` block on server.
+ */
+function register_block_core_categories() {
+       register_block_type(
+               'core/categories',
+               array(
+                       'render_callback' => 'render_block_core_categories',
+               )
+       );
+}
+
+add_action( 'init', 'register_block_core_categories' );
</ins></span></pre></div>
<a id="branches50srcwpincludesblockslatestcommentsphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/src/wp-includes/blocks/latest-comments.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/src/wp-includes/blocks/latest-comments.php                           (rev 0)
+++ branches/5.0/src/wp-includes/blocks/latest-comments.php     2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,182 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Server-side rendering of the `core/latest-comments` block.
+ *
+ * @package gutenberg
+ */
+
+/**
+ * Get the post title.
+ *
+ * The post title is fetched and if it is blank then a default string is
+ * returned.
+ *
+ * Copied from `wp-admin/includes/template.php`, but we can't include that
+ * file because:
+ *
+ * 1. It causes bugs with test fixture generation and strange Docker 255 error
+ *    codes.
+ * 2. It's in the admin; ideally we *shouldn't* be including files from the
+ *    admin for a block's output. It's a very small/simple function as well,
+ *    so duplicating it isn't too terrible.
+ *
+ * @since 3.3.0
+ *
+ * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
+ * @return string The post title if set; "(no title)" if no title is set.
+ */
+function gutenberg_draft_or_post_title( $post = 0 ) {
+       $title = get_the_title( $post );
+       if ( empty( $title ) ) {
+               $title = __( '(no title)', 'gutenberg' );
+       }
+       return esc_html( $title );
+}
+
+/**
+ * Renders the `core/latest-comments` block on server.
+ *
+ * @param array $attributes The block attributes.
+ *
+ * @return string Returns the post content with latest comments added.
+ */
+function gutenberg_render_block_core_latest_comments( $attributes = array() ) {
+       // This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php.
+       $comments = get_comments(
+               apply_filters(
+                       'widget_comments_args',
+                       array(
+                               'number'      => $attributes['commentsToShow'],
+                               'status'      => 'approve',
+                               'post_status' => 'publish',
+                       )
+               )
+       );
+
+       $list_items_markup = '';
+       if ( ! empty( $comments ) ) {
+               // Prime the cache for associated posts. This is copied from \WP_Widget_Recent_Comments::widget().
+               $post_ids = array_unique( wp_list_pluck( $comments, 'comment_post_ID' ) );
+               _prime_post_caches( $post_ids, strpos( get_option( 'permalink_structure' ), '%category%' ), false );
+
+               foreach ( $comments as $comment ) {
+                       $list_items_markup .= '<li class="wp-block-latest-comments__comment">';
+                       if ( $attributes['displayAvatar'] ) {
+                               $avatar = get_avatar(
+                                       $comment,
+                                       48,
+                                       '',
+                                       '',
+                                       array(
+                                               'class' => 'wp-block-latest-comments__comment-avatar',
+                                       )
+                               );
+                               if ( $avatar ) {
+                                       $list_items_markup .= $avatar;
+                               }
+                       }
+
+                       $list_items_markup .= '<article>';
+                       $list_items_markup .= '<footer class="wp-block-latest-comments__comment-meta">';
+                       $author_url         = get_comment_author_url( $comment );
+                       if ( empty( $author_url ) && ! empty( $comment->user_id ) ) {
+                               $author_url = get_author_posts_url( $comment->user_id );
+                       }
+
+                       $author_markup = '';
+                       if ( $author_url ) {
+                               $author_markup .= '<a class="wp-block-latest-comments__comment-author" href="' . esc_url( $author_url ) . '">' . get_comment_author( $comment ) . '</a>';
+                       } else {
+                               $author_markup .= '<span class="wp-block-latest-comments__comment-author">' . get_comment_author( $comment ) . '</span>';
+                       }
+
+                       // `_draft_or_post_title` calls `esc_html()` so we don't need to wrap that call in
+                       // `esc_html`.
+                       $post_title = '<a class="wp-block-latest-comments__comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '">' . gutenberg_draft_or_post_title( $comment->comment_post_ID ) . '</a>';
+
+                       $list_items_markup .= sprintf(
+                               /* translators: 1: author name (inside <a> or <span> tag, based on if they have a URL), 2: post title related to this comment */
+                               __( '%1$s on %2$s', 'gutenberg' ),
+                               $author_markup,
+                               $post_title
+                       );
+
+                       if ( $attributes['displayDate'] ) {
+                               $list_items_markup .= sprintf(
+                                       '<time datetime="%1$s" class="wp-block-latest-comments__comment-date">%2$s</time>',
+                                       esc_attr( get_comment_date( 'c', $comment ) ),
+                                       date_i18n( get_option( 'date_format' ), get_comment_date( 'U', $comment ) )
+                               );
+                       }
+                       $list_items_markup .= '</footer>';
+                       if ( $attributes['displayExcerpt'] ) {
+                               $list_items_markup .= '<div class="wp-block-latest-comments__comment-excerpt">' . wpautop( get_comment_excerpt( $comment ) ) . '</div>';
+                       }
+                       $list_items_markup .= '</article></li>';
+               }
+       }
+
+       $class = 'wp-block-latest-comments';
+       if ( $attributes['align'] ) {
+               $class .= " align{$attributes['align']}";
+       }
+       if ( $attributes['displayAvatar'] ) {
+               $class .= ' has-avatars';
+       }
+       if ( $attributes['displayDate'] ) {
+               $class .= ' has-dates';
+       }
+       if ( $attributes['displayExcerpt'] ) {
+               $class .= ' has-excerpts';
+       }
+       if ( empty( $comments ) ) {
+               $class .= ' no-comments';
+       }
+       $classnames = esc_attr( $class );
+
+       $block_content = ! empty( $comments ) ? sprintf(
+               '<ol class="%1$s">%2$s</ol>',
+               $classnames,
+               $list_items_markup
+       ) : sprintf(
+               '<div class="%1$s">%2$s</div>',
+               $classnames,
+               __( 'No comments to show.', 'gutenberg' )
+       );
+
+       return $block_content;
+}
+
+register_block_type(
+       'core/latest-comments',
+       array(
+               'attributes'      => array(
+                       'className'      => array(
+                               'type' => 'string',
+                       ),
+                       'commentsToShow' => array(
+                               'type'    => 'number',
+                               'default' => 5,
+                               'minimum' => 1,
+                               'maximum' => 100,
+                       ),
+                       'displayAvatar'  => array(
+                               'type'    => 'boolean',
+                               'default' => true,
+                       ),
+                       'displayDate'    => array(
+                               'type'    => 'boolean',
+                               'default' => true,
+                       ),
+                       'displayExcerpt' => array(
+                               'type'    => 'boolean',
+                               'default' => true,
+                       ),
+                       'align'          => array(
+                               'type' => 'string',
+                               'enum' => array( 'center', 'left', 'right', 'wide', 'full', '' ),
+                       ),
+               ),
+               'render_callback' => 'gutenberg_render_block_core_latest_comments',
+       )
+);
</ins></span></pre></div>
<a id="branches50srcwpincludesblockslatestpostsphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/src/wp-includes/blocks/latest-posts.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/src/wp-includes/blocks/latest-posts.php                              (rev 0)
+++ branches/5.0/src/wp-includes/blocks/latest-posts.php        2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,125 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Server-side rendering of the `core/latest-posts` block.
+ *
+ * @package gutenberg
+ */
+
+/**
+ * Renders the `core/latest-posts` block on server.
+ *
+ * @param array $attributes The block attributes.
+ *
+ * @return string Returns the post content with latest posts added.
+ */
+function render_block_core_latest_posts( $attributes ) {
+       $recent_posts = wp_get_recent_posts(
+               array(
+                       'numberposts' => $attributes['postsToShow'],
+                       'post_status' => 'publish',
+                       'order'       => $attributes['order'],
+                       'orderby'     => $attributes['orderBy'],
+                       'category'    => $attributes['categories'],
+               )
+       );
+
+       $list_items_markup = '';
+
+       foreach ( $recent_posts as $post ) {
+               $post_id = $post['ID'];
+
+               $title = get_the_title( $post_id );
+               if ( ! $title ) {
+                       $title = __( '(Untitled)', 'gutenberg' );
+               }
+               $list_items_markup .= sprintf(
+                       '<li><a href="%1$s">%2$s</a>',
+                       esc_url( get_permalink( $post_id ) ),
+                       esc_html( $title )
+               );
+
+               if ( isset( $attributes['displayPostDate'] ) && $attributes['displayPostDate'] ) {
+                       $list_items_markup .= sprintf(
+                               '<time datetime="%1$s" class="wp-block-latest-posts__post-date">%2$s</time>',
+                               esc_attr( get_the_date( 'c', $post_id ) ),
+                               esc_html( get_the_date( '', $post_id ) )
+                       );
+               }
+
+               $list_items_markup .= "</li>\n";
+       }
+
+       $class = 'wp-block-latest-posts';
+       if ( isset( $attributes['align'] ) ) {
+               $class .= ' align' . $attributes['align'];
+       }
+
+       if ( isset( $attributes['postLayout'] ) && 'grid' === $attributes['postLayout'] ) {
+               $class .= ' is-grid';
+       }
+
+       if ( isset( $attributes['columns'] ) && 'grid' === $attributes['postLayout'] ) {
+               $class .= ' columns-' . $attributes['columns'];
+       }
+
+       if ( isset( $attributes['className'] ) ) {
+               $class .= ' ' . $attributes['className'];
+       }
+
+       $block_content = sprintf(
+               '<ul class="%1$s">%2$s</ul>',
+               esc_attr( $class ),
+               $list_items_markup
+       );
+
+       return $block_content;
+}
+
+/**
+ * Registers the `core/latest-posts` block on server.
+ */
+function register_block_core_latest_posts() {
+       register_block_type(
+               'core/latest-posts',
+               array(
+                       'attributes'      => array(
+                               'categories'      => array(
+                                       'type' => 'string',
+                               ),
+                               'className'       => array(
+                                       'type' => 'string',
+                               ),
+                               'postsToShow'     => array(
+                                       'type'    => 'number',
+                                       'default' => 5,
+                               ),
+                               'displayPostDate' => array(
+                                       'type'    => 'boolean',
+                                       'default' => false,
+                               ),
+                               'postLayout'      => array(
+                                       'type'    => 'string',
+                                       'default' => 'list',
+                               ),
+                               'columns'         => array(
+                                       'type'    => 'number',
+                                       'default' => 3,
+                               ),
+                               'align'           => array(
+                                       'type' => 'string',
+                               ),
+                               'order'           => array(
+                                       'type'    => 'string',
+                                       'default' => 'desc',
+                               ),
+                               'orderBy'         => array(
+                                       'type'    => 'string',
+                                       'default' => 'date',
+                               ),
+                       ),
+                       'render_callback' => 'render_block_core_latest_posts',
+               )
+       );
+}
+
+add_action( 'init', 'register_block_core_latest_posts' );
</ins></span></pre></div>
<a id="branches50srcwpincludesblocksshortcodephp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/src/wp-includes/blocks/shortcode.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/src/wp-includes/blocks/shortcode.php                         (rev 0)
+++ branches/5.0/src/wp-includes/blocks/shortcode.php   2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,32 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Server-side rendering of the `core/shortcode` block.
+ *
+ * @package gutenberg
+ */
+
+/**
+ * Performs wpautop() on the shortcode block content.
+ *
+ * @param array  $attributes The block attributes.
+ * @param string $content    The block content.
+ *
+ * @return string Returns the block content.
+ */
+function render_block_core_shortcode( $attributes, $content ) {
+       return wpautop( $content );
+}
+
+/**
+ * Registers the `core/shortcode` block on server.
+ */
+function register_block_core_shortcode() {
+       register_block_type(
+               'core/shortcode',
+               array(
+                       'render_callback' => 'render_block_core_shortcode',
+               )
+       );
+}
+
+add_action( 'init', 'register_block_core_shortcode' );
</ins></span></pre></div>
<a id="branches50srcwpincludesblocksphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.0/src/wp-includes/blocks.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/src/wp-includes/blocks.php   2018-10-18 04:39:40 UTC (rev 43751)
+++ branches/5.0/src/wp-includes/blocks.php     2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -114,6 +114,44 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Remove all dynamic blocks from the given content.
+ *
+ * @since 5.0.0
+ *
+ * @param string $content Content of the current post.
+ * @return string
+ */
+function strip_dynamic_blocks( $content ) {
+       return _recurse_strip_dynamic_blocks( parse_blocks( $content ) );
+}
+
+/**
+ * Helper function for strip_dynamic_blocks(), to recurse through the block tree.
+ *
+ * @since 5.0.0
+ * @access private
+ *
+ * @param array $blocks Array of blocks from parse_blocks().
+ * @return string HTML from the non-dynamic blocks.
+ */
+function _recurse_strip_dynamic_blocks( $blocks ) {
+       $clean_content  = '';
+       $dynamic_blocks = get_dynamic_block_names();
+
+       foreach ( $blocks as $block ) {
+               if ( ! in_array( $block['blockName'], $dynamic_blocks ) ) {
+                       if ( $block['innerBlocks'] ) {
+                               $clean_content .= _recurse_strip_dynamic_blocks( $block['innerBlocks'] );
+                       } else {
+                               $clean_content .= $block['innerHTML'];
+                       }
+               }
+       }
+
+       return $clean_content;
+}
+
+/**
</ins><span class="cx" style="display: block; padding: 0 10px">  * Parses blocks out of a content string.
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * @since 5.0.0
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -142,7 +180,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 5.0.0
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @param string $parser_class Name of block parser class
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string $parser_class Name of block parser class.
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        $parser_class = apply_filters( 'block_parser_class', 'WP_Block_Parser' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -149,3 +187,78 @@
</span><span class="cx" style="display: block; padding: 0 10px">        $parser = new $parser_class();
</span><span class="cx" style="display: block; padding: 0 10px">        return $parser->parse( $content );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+/**
+ * Parses dynamic blocks out of `post_content` and re-renders them.
+ *
+ * @since 5.0.0
+ * @global WP_Post $post The post to edit.
+ *
+ * @param  string $content Post content.
+ * @return string Updated post content.
+ */
+function do_blocks( $content ) {
+       $blocks = parse_blocks( $content );
+       return _recurse_do_blocks( $blocks, $blocks );
+}
+
+/**
+ * Helper function for do_blocks(), to recurse through the block tree.
+ *
+ * @since 5.0.0
+ * @access private
+ *
+ * @param array $blocks     Array of blocks from parse_blocks().
+ * @param array $all_blocks The top level array of blocks.
+ * @return string The block HTML.
+ */
+function _recurse_do_blocks( $blocks, $all_blocks ) {
+       global $post;
+
+       /*
+        * Back up global post, to restore after render callback.
+        * Allows callbacks to run new WP_Query instances without breaking the global post.
+        */
+       $global_post = $post;
+
+       $rendered_content = '';
+       $dynamic_blocks   = get_dynamic_block_names();
+
+       foreach ( $blocks as $block ) {
+               $block = (array) $block;
+               if ( in_array( $block['blockName'], $dynamic_blocks ) ) {
+                       // Find registered block type. We can assume it exists since we use the
+                       // `get_dynamic_block_names` function as a source for pattern matching.
+                       $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] );
+
+                       // Replace dynamic block with server-rendered output.
+                       $block_content = $block_type->render( (array) $block['attrs'], $block['innerHTML'] );
+               } else if ( $block['innerBlocks'] ) {
+                       $block_content = _recurse_do_blocks( $block['innerBlocks'], $blocks );
+               } else {
+                       $block_content = $block['innerHTML'];
+               }
+
+               /**
+                * Filters the content of a single block.
+                *
+                * During the_content, each block is parsed and added to the output individually. This filter allows
+                * that content to be altered immediately before it's appended.
+                *
+                * @since 5.0.0
+                *
+                * @param string $block_content The block content about to be appended.
+                * @param array  $block         The full block, including name and attributes.
+                * @param array  $all_blocks    The array of all blocks being processed.
+                */
+               $rendered_content .= apply_filters( 'do_block', $block_content, $block, $all_blocks );
+
+               // Restore global $post.
+               $post = $global_post;
+       }
+
+       // Strip remaining block comment demarcations.
+       $rendered_content = preg_replace( '/<!--\s+\/?wp:.*?-->/m', '', $rendered_content );
+
+       return $rendered_content;
+}
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="branches50srcwpincludesclasswpblockparserphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.0/src/wp-includes/class-wp-block-parser.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/src/wp-includes/class-wp-block-parser.php    2018-10-18 04:39:40 UTC (rev 43751)
+++ branches/5.0/src/wp-includes/class-wp-block-parser.php      2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -306,7 +306,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                 * block and add it as a new innerBlock to the parent
</span><span class="cx" style="display: block; padding: 0 10px">                                 */
</span><span class="cx" style="display: block; padding: 0 10px">                                $stack_top = array_pop( $this->stack );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $stack_top->block->innerHTML .= substr( $this->document, $stack_top->prev_offset, $start_offset - $stack_top->prev_offset );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+                               $html = substr( $this->document, $stack_top->prev_offset, $start_offset - $stack_top->prev_offset );
+                               if ( $stack_top->block->innerBlocks ) {
+                                       $stack_top->block->innerBlocks[] = (array) $this->freeform( $html );
+                               } else {
+                                       $stack_top->block->innerHTML = $html;
+                               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $stack_top->prev_offset = $start_offset + $token_length;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                $this->add_inner_block(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -440,8 +447,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function add_inner_block( WP_Block_Parser_Block $block, $token_start, $token_length, $last_offset = null ) {
</span><span class="cx" style="display: block; padding: 0 10px">                $parent = $this->stack[ count( $this->stack ) - 1 ];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $parent->block->innerBlocks[] = $block;
-               $parent->block->innerHTML .= substr( $this->document, $parent->prev_offset, $token_start - $parent->prev_offset );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $parent->block->innerBlocks[] = (array) $this->freeform( substr( $this->document, $parent->prev_offset, $token_start - $parent->prev_offset ) );
+               $parent->block->innerBlocks[] = (array) $block;
</ins><span class="cx" style="display: block; padding: 0 10px">                 $parent->prev_offset = $last_offset ? $last_offset : $token_start + $token_length;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -456,10 +463,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $stack_top   = array_pop( $this->stack );
</span><span class="cx" style="display: block; padding: 0 10px">                $prev_offset = $stack_top->prev_offset;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $stack_top->block->innerHTML .= isset( $end_offset )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $html = isset( $end_offset )
</ins><span class="cx" style="display: block; padding: 0 10px">                         ? substr( $this->document, $prev_offset, $end_offset - $prev_offset )
</span><span class="cx" style="display: block; padding: 0 10px">                        : substr( $this->document, $prev_offset );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( $stack_top->block->innerBlocks ) {
+                       $stack_top->block->innerBlocks[] = (array) $this->freeform( $html );
+               } else {
+                       $stack_top->block->innerHTML = $html;
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 if ( isset( $stack_top->leading_html_start ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->output[] = (array) self::freeform( substr(
</span><span class="cx" style="display: block; padding: 0 10px">                                $this->document,
</span></span></pre></div>
<a id="branches50srcwpincludesdefaultfiltersphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.0/src/wp-includes/default-filters.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/src/wp-includes/default-filters.php  2018-10-18 04:39:40 UTC (rev 43751)
+++ branches/5.0/src/wp-includes/default-filters.php    2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -171,6 +171,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'the_title', 'convert_chars' );
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'the_title', 'trim'          );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+add_filter( 'the_content', 'do_blocks',                      9 );
</ins><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'the_content', 'wptexturize'                       );
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'the_content', 'convert_smilies',               20 );
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'the_content', 'wpautop'                           );
</span></span></pre></div>
<a id="branches50srcwpincludesformattingphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.0/src/wp-includes/formatting.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/src/wp-includes/formatting.php       2018-10-18 04:39:40 UTC (rev 43751)
+++ branches/5.0/src/wp-includes/formatting.php 2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -442,6 +442,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">        if ( trim($pee) === '' )
</span><span class="cx" style="display: block; padding: 0 10px">                return '';
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        // We don't need to autop posts with blocks in them.
+       if ( has_blocks( $pee ) ) {
+               return $pee;
+       }
+
</ins><span class="cx" style="display: block; padding: 0 10px">         // Just to make things a little easier, pad the end.
</span><span class="cx" style="display: block; padding: 0 10px">        $pee = $pee . "\n";
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3371,6 +3376,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $text = get_the_content('');
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $text = strip_shortcodes( $text );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                $text = strip_dynamic_blocks( $text );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                /** This filter is documented in wp-includes/post-template.php */
</span><span class="cx" style="display: block; padding: 0 10px">                $text = apply_filters( 'the_content', $text );
</span></span></pre></div>
<a id="branches50srcwpsettingsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.0/src/wp-settings.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/src/wp-settings.php  2018-10-18 04:39:40 UTC (rev 43751)
+++ branches/5.0/src/wp-settings.php    2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -247,6 +247,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require( ABSPATH . WPINC . '/class-wp-block-type-registry.php' );
</span><span class="cx" style="display: block; padding: 0 10px"> require( ABSPATH . WPINC . '/class-wp-block-parser.php' );
</span><span class="cx" style="display: block; padding: 0 10px"> require( ABSPATH . WPINC . '/blocks.php' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+require( ABSPATH . WPINC . '/blocks/archives.php' );
+require( ABSPATH . WPINC . '/blocks/block.php' );
+require( ABSPATH . WPINC . '/blocks/categories.php' );
+require( ABSPATH . WPINC . '/blocks/latest-comments.php' );
+require( ABSPATH . WPINC . '/blocks/latest-posts.php' );
+require( ABSPATH . WPINC . '/blocks/shortcode.php' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> $GLOBALS['wp_embed'] = new WP_Embed();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="branches50testsphpunitdatablocksdoblocksexpectedhtml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.0/tests/phpunit/data/blocks/do-blocks-expected.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/do-blocks-expected.html    2018-10-18 04:39:40 UTC (rev 43751)
+++ branches/5.0/tests/phpunit/data/blocks/do-blocks-expected.html      2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2,13 +2,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> <!--more-->
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <p>First Gutenberg Paragraph</p>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <p>Second Auto Paragraph</p>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+
</ins><span class="cx" style="display: block; padding: 0 10px"> <p>Third Gutenberg Paragraph</p>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <p>Third Auto Paragraph</p>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> <p>[someshortcode]</p>
</span></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__4invalidstartingletterserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__4-invalid-starting-letter.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__4-invalid-starting-letter.server.html                               (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__4-invalid-starting-letter.server.html 2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__archivesserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__archives.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__archives.server.html                                (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__archives.server.html  2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<div class="wp-block-archives">No archives to show.</div>
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__archives__showPostCountsserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__archives__showPostCounts.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__archives__showPostCounts.server.html                                (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__archives__showPostCounts.server.html  2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<div class="wp-block-archives">No archives to show.</div>
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__audioserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__audio.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__audio.server.html                           (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__audio.server.html     2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,5 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<figure class="wp-block-audio alignright">
+    <audio controls="" src="https://media.simplecast.com/episodes/audio/80564/draft-podcast-51-livePublish2.mp3"></audio>
+</figure>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__blockserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__block.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__block.server.html                           (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__block.server.html     2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__button__centerserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__button__center.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__button__center.server.html                          (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__button__center.server.html    2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<div class="wp-block-button aligncenter"><a class="wp-block-button__link" href="https://github.com/WordPress/gutenberg">Help build Gutenberg</a></div>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__categoriesserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__categories.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__categories.server.html                              (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__categories.server.html        2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<ul class="wp-block-categories wp-block-categories-list aligncenter"><li class="cat-item-none">No categories</li></ul>
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__codeserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__code.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__code.server.html                            (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__code.server.html      2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,5 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<pre class="wp-block-code"><code>export default function MyButton() {
+       return &lt;Button&gt;Click Me!&lt;/Button&gt;;
+}</code></pre>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__columnparsedjson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.0/tests/phpunit/data/blocks/fixtures/core__column.parsed.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__column.parsed.json  2018-10-18 04:39:40 UTC (rev 43751)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__column.parsed.json    2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,6 +3,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">         "blockName": "core/column",
</span><span class="cx" style="display: block; padding: 0 10px">         "attrs": {},
</span><span class="cx" style="display: block; padding: 0 10px">         "innerBlocks": [
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        {
+                               "blockName": null,
+                               "attrs": {},
+                               "innerBlocks": [],
+                               "innerHTML": "\n<div class=\"wp-block-column\">\n\t"
+                       },
</ins><span class="cx" style="display: block; padding: 0 10px">             {
</span><span class="cx" style="display: block; padding: 0 10px">                 "blockName": "core/paragraph",
</span><span class="cx" style="display: block; padding: 0 10px">                 "attrs": {},
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,14 +15,26 @@
</span><span class="cx" style="display: block; padding: 0 10px">                 "innerBlocks": [],
</span><span class="cx" style="display: block; padding: 0 10px">                 "innerHTML": "\n\t<p>Column One, Paragraph One</p>\n\t"
</span><span class="cx" style="display: block; padding: 0 10px">             },
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        {
+                               "blockName": null,
+                               "attrs": {},
+                               "innerBlocks": [],
+                               "innerHTML": "\n\t"
+                       },
</ins><span class="cx" style="display: block; padding: 0 10px">             {
</span><span class="cx" style="display: block; padding: 0 10px">                 "blockName": "core/paragraph",
</span><span class="cx" style="display: block; padding: 0 10px">                 "attrs": {},
</span><span class="cx" style="display: block; padding: 0 10px">                 "innerBlocks": [],
</span><span class="cx" style="display: block; padding: 0 10px">                 "innerHTML": "\n\t<p>Column One, Paragraph Two</p>\n\t"
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-            }
-        ],
-        "innerHTML": "\n<div class=\"wp-block-column\">\n\t\n\t\n</div>\n"
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+            },
+                       {
+                               "blockName": null,
+                               "attrs": {},
+                               "innerBlocks": [],
+                               "innerHTML": "\n</div>\n"
+                       }
+               ],
+               "innerHTML": ""
</ins><span class="cx" style="display: block; padding: 0 10px">     },
</span><span class="cx" style="display: block; padding: 0 10px">     {
</span><span class="cx" style="display: block; padding: 0 10px">         "blockName": null,
</span></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__columnserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__column.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__column.server.html                          (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__column.server.html    2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,10 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<div class="wp-block-column">
+       
+       <p>Column One, Paragraph One</p>
+       
+       
+       <p>Column One, Paragraph Two</p>
+       
+</div>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__columnsparsedjson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.0/tests/phpunit/data/blocks/fixtures/core__columns.parsed.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__columns.parsed.json 2018-10-18 04:39:40 UTC (rev 43751)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__columns.parsed.json   2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5,46 +5,100 @@
</span><span class="cx" style="display: block; padding: 0 10px">             "columns": 3
</span><span class="cx" style="display: block; padding: 0 10px">         },
</span><span class="cx" style="display: block; padding: 0 10px">         "innerBlocks": [
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        {
+                               "blockName": null,
+                               "attrs": {},
+                               "innerBlocks": [],
+                               "innerHTML": "\n<div class=\"wp-block-columns has-3-columns\">\n\t"
+                       },
</ins><span class="cx" style="display: block; padding: 0 10px">             {
</span><span class="cx" style="display: block; padding: 0 10px">                 "blockName": "core/column",
</span><span class="cx" style="display: block; padding: 0 10px">                 "attrs": {},
</span><span class="cx" style="display: block; padding: 0 10px">                 "innerBlocks": [
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                    {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 {
+                                               "blockName": null,
+                                               "attrs": {},
+                                               "innerBlocks": [],
+                                               "innerHTML": "\n\t<div class=\"wp-block-column\">\n\t\t"
+                                       },
+                                       {
</ins><span class="cx" style="display: block; padding: 0 10px">                         "blockName": "core/paragraph",
</span><span class="cx" style="display: block; padding: 0 10px">                         "attrs": {},
</span><span class="cx" style="display: block; padding: 0 10px">                         "innerBlocks": [],
</span><span class="cx" style="display: block; padding: 0 10px">                         "innerHTML": "\n\t\t<p>Column One, Paragraph One</p>\n\t\t"
</span><span class="cx" style="display: block; padding: 0 10px">                     },
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                    {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 {
+                                               "blockName": null,
+                                               "attrs": {},
+                                               "innerBlocks": [],
+                                               "innerHTML": "\n\t\t"
+                                       },
+                                       {
</ins><span class="cx" style="display: block; padding: 0 10px">                         "blockName": "core/paragraph",
</span><span class="cx" style="display: block; padding: 0 10px">                         "attrs": {},
</span><span class="cx" style="display: block; padding: 0 10px">                         "innerBlocks": [],
</span><span class="cx" style="display: block; padding: 0 10px">                         "innerHTML": "\n\t\t<p>Column One, Paragraph Two</p>\n\t\t"
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                    }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                    },
+                                       {
+                                               "blockName": null,
+                                               "attrs": {},
+                                               "innerBlocks": [],
+                                               "innerHTML": "\n\t</div>\n\t"
+                                       }
</ins><span class="cx" style="display: block; padding: 0 10px">                 ],
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                "innerHTML": "\n\t<div class=\"wp-block-column\">\n\t\t\n\t\t\n\t</div>\n\t"
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                "innerHTML": ""
</ins><span class="cx" style="display: block; padding: 0 10px">             },
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        {
+                               "blockName": null,
+                               "attrs": {},
+                               "innerBlocks": [],
+                               "innerHTML": "\n\t"
+                       },
</ins><span class="cx" style="display: block; padding: 0 10px">             {
</span><span class="cx" style="display: block; padding: 0 10px">                 "blockName": "core/column",
</span><span class="cx" style="display: block; padding: 0 10px">                 "attrs": {},
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                "innerBlocks": [
-                    {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         "innerBlocks": [
+                                       {
+                                               "blockName": null,
+                                               "attrs": {},
+                                               "innerBlocks": [],
+                                               "innerHTML": "\n\t<div class=\"wp-block-column\">\n\t\t"
+                                       },
+                                       {
</ins><span class="cx" style="display: block; padding: 0 10px">                         "blockName": "core/paragraph",
</span><span class="cx" style="display: block; padding: 0 10px">                         "attrs": {},
</span><span class="cx" style="display: block; padding: 0 10px">                         "innerBlocks": [],
</span><span class="cx" style="display: block; padding: 0 10px">                         "innerHTML": "\n\t\t<p>Column Two, Paragraph One</p>\n\t\t"
</span><span class="cx" style="display: block; padding: 0 10px">                     },
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                    {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 {
+                                               "blockName": null,
+                                               "attrs": {},
+                                               "innerBlocks": [],
+                                               "innerHTML": "\n\t\t"
+                                       },
+                                       {
</ins><span class="cx" style="display: block; padding: 0 10px">                         "blockName": "core/paragraph",
</span><span class="cx" style="display: block; padding: 0 10px">                         "attrs": {},
</span><span class="cx" style="display: block; padding: 0 10px">                         "innerBlocks": [],
</span><span class="cx" style="display: block; padding: 0 10px">                         "innerHTML": "\n\t\t<p>Column Three, Paragraph One</p>\n\t\t"
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                    }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                    },
+                                       {
+                                               "blockName": null,
+                                               "attrs": {},
+                                               "innerBlocks": [],
+                                               "innerHTML": "\n\t</div>\n\t"
+                                       }
</ins><span class="cx" style="display: block; padding: 0 10px">                 ],
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                "innerHTML": "\n\t<div class=\"wp-block-column\">\n\t\t\n\t\t\n\t</div>\n\t"
-            }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                "innerHTML": ""
+            },
+                       {
+                               "blockName": null,
+                               "attrs": {},
+                               "innerBlocks": [],
+                               "innerHTML": "\n</div>\n"
+                       }
</ins><span class="cx" style="display: block; padding: 0 10px">         ],
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        "innerHTML": "\n<div class=\"wp-block-columns has-3-columns\">\n\t\n\t\n</div>\n"
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        "innerHTML": ""
</ins><span class="cx" style="display: block; padding: 0 10px">     },
</span><span class="cx" style="display: block; padding: 0 10px">     {
</span><span class="cx" style="display: block; padding: 0 10px">         "blockName": null,
</span></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__columnsserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__columns.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__columns.server.html                         (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__columns.server.html   2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,24 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<div class="wp-block-columns has-3-columns">
+       
+       <div class="wp-block-column">
+               
+               <p>Column One, Paragraph One</p>
+               
+               
+               <p>Column One, Paragraph Two</p>
+               
+       </div>
+       
+       
+       <div class="wp-block-column">
+               
+               <p>Column Two, Paragraph One</p>
+               
+               
+               <p>Column Three, Paragraph One</p>
+               
+       </div>
+       
+</div>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__coverimageserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__cover-image.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__cover-image.server.html                             (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__cover-image.server.html       2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,5 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<div class="wp-block-cover-image has-background-dim-40 has-background-dim" style="background-image:url(https://cldup.com/uuUqE_dXzy.jpg)">
+    <p class="wp-block-cover-image-text">Guten Berg!</p>
+</div>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__embedserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__embed.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__embed.server.html                           (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__embed.server.html     2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,8 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<figure class="wp-block-embed">
+    <div class="wp-block-embed__wrapper">
+        https://example.com/
+    </div>
+    <figcaption>Embedded content from an example URL</figcaption>
+</figure>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__file__newwindowserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__file__new-window.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__file__new-window.server.html                                (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__file__new-window.server.html  2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<div class="wp-block-file"><a href="http://localhost:8888/wp-content/uploads/2018/05/keycodes.js" target="_blank" rel="noreferrer noopener">6546</a><a href="http://localhost:8888/wp-content/uploads/2018/05/keycodes.js" class="wp-block-file__button" download="6546">Download</a></div>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__file__nodownloadbuttonserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__file__no-download-button.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__file__no-download-button.server.html                                (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__file__no-download-button.server.html  2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<div class="wp-block-file"><a href="http://localhost:8888/?attachment_id=176">lkjfijwef</a></div>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__file__notextlinkserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__file__no-text-link.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__file__no-text-link.server.html                              (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__file__no-text-link.server.html        2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<div class="wp-block-file"><a href="http://localhost:8888/wp-content/uploads/2018/05/keycodes.js" class="wp-block-file__button" download="">Download</a></div>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__freeformserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__freeform.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__freeform.server.html                                (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__freeform.server.html  2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,6 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+Testing freeform block with some
+<div class="wp-some-class">
+       HTML <span style="color: red;">content</span>
+</div>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__freeform__undelimitedserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__freeform__undelimited.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__freeform__undelimited.server.html                           (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__freeform__undelimited.server.html     2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,4 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+Testing freeform block with some
+<div class="wp-some-class">
+       HTML <span style="color: red;">content</span>
+</div>
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__galleryserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__gallery.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__gallery.server.html                         (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__gallery.server.html   2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,14 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<ul class="wp-block-gallery columns-2 is-cropped">
+       <li class="blocks-gallery-item">
+               <figure>
+                       <img src="https://cldup.com/uuUqE_dXzy.jpg" alt="title" />
+               </figure>
+       </li>
+       <li class="blocks-gallery-item">
+               <figure>
+                       <img src="http://google.com/hi.png" alt="title" />
+               </figure>
+       </li>
+</ul>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__gallery__columnsserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__gallery__columns.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__gallery__columns.server.html                                (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__gallery__columns.server.html  2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,14 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<ul class="wp-block-gallery columns-1 is-cropped">
+       <li class="blocks-gallery-item">
+               <figure>
+                       <img src="https://cldup.com/uuUqE_dXzy.jpg" alt="title" />
+               </figure>
+       </li>
+       <li class="blocks-gallery-item">
+               <figure>
+                       <img src="http://google.com/hi.png" alt="title" />
+               </figure>
+       </li>
+</ul>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__heading__h2emserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__heading__h2-em.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__heading__h2-em.server.html                          (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__heading__h2-em.server.html    2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<h2>The <em>Inserter</em> Tool</h2>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__heading__h2serverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__heading__h2.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__heading__h2.server.html                             (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__heading__h2.server.html       2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<h2>A picture is worth a thousand words, or so the saying goes</h2>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__htmlserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__html.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__html.server.html                            (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__html.server.html      2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,4 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<h1>Some HTML code</h1>
+<marquee>This text will scroll from right to left</marquee>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__imageserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__image.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__image.server.html                           (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__image.server.html     2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<figure class="wp-block-image"><img src="https://cldup.com/uuUqE_dXzy.jpg" alt="" /></figure>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__image__attachmentlinkserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__image__attachment-link.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__image__attachment-link.server.html                          (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__image__attachment-link.server.html    2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<figure class="wp-block-image"><a href="http://localhost:8888/?attachment_id=7"><img src="https://cldup.com/uuUqE_dXzy.jpg" alt="" /></a></figure>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__image__centercaptionserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__image__center-caption.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__image__center-caption.server.html                           (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__image__center-caption.server.html     2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<div class="wp-block-image"><figure class="aligncenter"><img src="https://cldup.com/YLYhpou2oq.jpg" alt="" /><figcaption>Give it a try. Press the &quot;really wide&quot; button on the image toolbar.</figcaption></figure></div>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__image__customlinkserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__image__custom-link.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__image__custom-link.server.html                              (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__image__custom-link.server.html        2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<figure class="wp-block-image"><a href="https://wordpress.org/"><img src="https://cldup.com/uuUqE_dXzy.jpg" alt="" /></a></figure>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__image__medialinkserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__image__media-link.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__image__media-link.server.html                               (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__image__media-link.server.html 2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<figure class="wp-block-image"><a href="https://cldup.com/uuUqE_dXzy.jpg"><img src="https://cldup.com/uuUqE_dXzy.jpg" alt="" /></a></figure>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__invalidCapitalsserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__invalid-Capitals.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__invalid-Capitals.server.html                                (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__invalid-Capitals.server.html  2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__invalidspecialserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__invalid-special.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__invalid-special.server.html                         (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__invalid-special.server.html   2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__latestcommentsserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__latest-comments.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__latest-comments.server.html                         (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__latest-comments.server.html   2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<div class="wp-block-latest-comments has-avatars has-dates has-excerpts no-comments">No comments to show.</div>
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__latestpostsserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__latest-posts.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__latest-posts.server.html                            (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__latest-posts.server.html      2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<ul class="wp-block-latest-posts"></ul>
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__latestposts__displayPostDateserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__latest-posts__displayPostDate.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__latest-posts__displayPostDate.server.html                           (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__latest-posts__displayPostDate.server.html     2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<ul class="wp-block-latest-posts"></ul>
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__list__ulserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__list__ul.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__list__ul.server.html                                (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__list__ul.server.html  2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<ul><li>Text & Headings</li><li>Images & Videos</li><li>Galleries</li><li>Embeds, like YouTube, Tweets, or other WordPress posts.</li><li>Layout blocks, like Buttons, Hero Images, Separators, etc.</li><li>And <em>Lists</em> like this one of course :)</li></ul>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__missingserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__missing.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__missing.server.html                         (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__missing.server.html   2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,6 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<p>Testing missing block with some</p>
+<div class="wp-some-class">
+       HTML <span style="color: red;">content</span>
+</div>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__moreserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__more.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__more.server.html                            (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__more.server.html      2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<!--more-->
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__more__customtextteaserserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__more__custom-text-teaser.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__more__custom-text-teaser.server.html                                (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__more__custom-text-teaser.server.html  2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,4 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<!--more Continue Reading-->
+<!--noteaser-->
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__nextpageserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__nextpage.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__nextpage.server.html                                (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__nextpage.server.html  2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<!--nextpage-->
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__paragraph__alignrightserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__paragraph__align-right.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__paragraph__align-right.server.html                          (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__paragraph__align-right.server.html    2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<p style="text-align:right;">... like this one, which is separate from the above and right aligned.</p>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__paragraph__deprecatedserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__paragraph__deprecated.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__paragraph__deprecated.server.html                           (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__paragraph__deprecated.server.html     2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+Unwrapped is <em>still</em> valid.
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__preformattedserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__preformatted.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__preformatted.server.html                            (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__preformatted.server.html      2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<pre class="wp-block-preformatted">Some <em>preformatted</em> text...<br>And more!</pre>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__pullquoteserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__pullquote.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__pullquote.server.html                               (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__pullquote.server.html 2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,7 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<figure class="wp-block-pullquote">
+    <blockquote>
+    <p>Testing pullquote block...</p><cite>...with a caption</cite>
+    </blockquote>
+</figure>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__pullquote__multiparagraphserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__pullquote__multi-paragraph.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__pullquote__multi-paragraph.server.html                              (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__pullquote__multi-paragraph.server.html        2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,9 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<figure class="wp-block-pullquote">
+    <blockquote>
+        <p>Paragraph <strong>one</strong></p>
+        <p>Paragraph two</p>
+        <cite>by whomever</cite>
+       </blockquote>
+</figure>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__quote__style1serverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__quote__style-1.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__quote__style-1.server.html                          (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__quote__style-1.server.html    2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<blockquote class="wp-block-quote"><p>The editor will endeavour to create a new page and post building experience that makes writing rich posts effortless, and has “blocks” to make it easy what today might take shortcodes, custom HTML, or “mystery meat” embed discovery.</p><cite>Matt Mullenweg, 2017</cite></blockquote>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__quote__style2serverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__quote__style-2.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__quote__style-2.server.html                          (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__quote__style-2.server.html    2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<blockquote class="wp-block-quote is-style-large"><p>There is no greater agony than bearing an untold story inside you.</p><cite>Maya Angelou</cite></blockquote>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__separatorserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__separator.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__separator.server.html                               (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__separator.server.html 2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<hr class="wp-block-separator" />
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__shortcodeserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__shortcode.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__shortcode.server.html                               (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__shortcode.server.html 2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,2 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<p>[gallery ids="238,338"]</p>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__spacerserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__spacer.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__spacer.server.html                          (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__spacer.server.html    2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__subheadserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__subhead.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__subhead.server.html                         (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__subhead.server.html   2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<p class="wp-block-subhead">This is a <em>subhead</em>.</p>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__tableserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__table.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__table.server.html                           (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__table.server.html     2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<table class="wp-block-table"><thead><tr><th>Version</th><th>Musician</th><th>Date</th></tr></thead><tbody><tr><td><a href="https://wordpress.org/news/2003/05/wordpress-now-available/">.70</a></td><td>No musician chosen.</td><td>May 27, 2003</td></tr><tr><td><a href="https://wordpress.org/news/2004/01/wordpress-10/">1.0</a></td><td>Miles Davis</td><td>January 3, 2004</td></tr><tr><td>Lots of versions skipped, see <a href="https://codex.wordpress.org/WordPress_Versions">the full list</a></td><td>&hellip;</td><td>&hellip;</td></tr><tr><td><a href="https://wordpress.org/news/2015/12/clifford/">4.4</a></td><td>Clifford Brown</td><td>De
 cember 8, 2015</td></tr><tr><td><a href="https://wordpress.org/news/2016/04/coleman/">4.5</a></td><td>Coleman Hawkins</td><td>April 12, 2016</td></tr><tr><td><a href="https://wordpress.org/news/2016/08/pepper/">4.6</a></td><td>Pepper Adams</td><td>August 16, 2016</td></tr><tr><td><a href="https://wordpress.org/news/2016/12/vaughan/">4.7</a></td><td>Sarah Vaughan</td><td>December 6, 2016</td></tr></tbody></table>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__textcolumnsserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__text-columns.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__text-columns.server.html                            (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__text-columns.server.html      2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,10 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<div class="wp-block-text-columns aligncenter columns-2">
+    <div class="wp-block-column">
+        <p>One</p>
+    </div>
+    <div class="wp-block-column">
+        <p>Two</p>
+    </div>
+</div>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__text__convertstoparagraphserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__text__converts-to-paragraph.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__text__converts-to-paragraph.server.html                             (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__text__converts-to-paragraph.server.html       2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<p>This is an old-style text block.  Changed to <code>paragraph</code> in #2135.</p>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__verseserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__verse.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__verse.server.html                           (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__verse.server.html     2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<pre class="wp-block-verse">A <em>verse</em>…<br>And more!</pre>
+
</ins></span></pre></div>
<a id="branches50testsphpunitdatablocksfixturescore__videoserverhtml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/data/blocks/fixtures/core__video.server.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/data/blocks/fixtures/core__video.server.html                           (rev 0)
+++ branches/5.0/tests/phpunit/data/blocks/fixtures/core__video.server.html     2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,3 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+<figure class="wp-block-video"><video controls src="https://awesome-fake.video/file.mp4"></video></figure>
+
</ins></span></pre></div>
<a id="branches50testsphpunitincludesfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.0/tests/phpunit/includes/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/includes/functions.php 2018-10-18 04:39:40 UTC (rev 43751)
+++ branches/5.0/tests/phpunit/includes/functions.php   2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -182,3 +182,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Skip `setcookie` calls in auth_cookie functions due to warning:
</span><span class="cx" style="display: block; padding: 0 10px"> // Cannot modify header information - headers already sent by ...
</span><span class="cx" style="display: block; padding: 0 10px"> tests_add_filter( 'send_auth_cookies', '__return_false' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+/**
+ * After the init action has been run once, trying to re-register block types can cause
+ * _doing_it_wrong warnings. To avoid this, unhook the block registration functions.
+ *
+ * @since 5.0.0
+ */
+function _unhook_block_registration() {
+       remove_action( 'init', 'register_block_core_archives' );
+       remove_action( 'init', 'register_block_core_categories' );
+       remove_action( 'init', 'register_block_core_latest_posts' );
+       remove_action( 'init', 'register_block_core_shortcode' );
+}
+tests_add_filter( 'init', '_unhook_block_registration', 1000 );
</ins></span></pre></div>
<a id="branches50testsphpunittestsblocksblockparserphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.0/tests/phpunit/tests/blocks/block-parser.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/tests/blocks/block-parser.php  2018-10-18 04:39:40 UTC (rev 43751)
+++ branches/5.0/tests/phpunit/tests/blocks/block-parser.php    2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -59,7 +59,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                foreach ( array( $html_path, $parsed_json_path ) as $filename ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( ! file_exists( $filename ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                //throw new Exception( "Missing fixture file: '$filename'" );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         throw new Exception( "Missing fixture file: '$filename'" );
</ins><span class="cx" style="display: block; padding: 0 10px">                         }
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -116,5 +116,4 @@
</span><span class="cx" style="display: block; padding: 0 10px">        protected function strip_r( $input ) {
</span><span class="cx" style="display: block; padding: 0 10px">                return str_replace( "\r", '', $input );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="branches50testsphpunittestsblocksrenderphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.0/tests/phpunit/tests/blocks/render.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tests/phpunit/tests/blocks/render.php                                (rev 0)
+++ branches/5.0/tests/phpunit/tests/blocks/render.php  2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,308 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Block rendering tests.
+ *
+ * @package WordPress
+ * @subpackage Blocks
+ * @since 5.0.0
+ */
+
+/**
+ * Tests for block rendering functions
+ *
+ * @since 5.0.0
+ *
+ * @group blocks
+ */
+class WP_Test_Block_Render extends WP_UnitTestCase {
+       /**
+        * The location of the fixtures to test with.
+        *
+        * @since 5.0.0
+        * @var string
+        */
+       protected static $fixtures_dir;
+
+       /**
+        * Test block instance number.
+        *
+        * @since 5.0.0
+        *
+        * @var int
+        */
+       protected $test_block_instance_number = 0;
+
+       /**
+        * Tear down after each test.
+        *
+        * @since 5.0.0
+        */
+       public function tearDown() {
+               parent::tearDown();
+
+               $this->test_block_instance_number = 0;
+
+               $registry = WP_Block_Type_Registry::get_instance();
+               if ( $registry->is_registered( 'core/test' ) ) {
+                       $registry->unregister( 'core/test' );
+               }
+       }
+
+       /**
+        * @ticket 45109
+        */
+       public function test_do_blocks_removes_comments() {
+               $original_html = file_get_contents( DIR_TESTDATA . '/blocks/do-blocks-original.html' );
+               $expected_html = file_get_contents( DIR_TESTDATA . '/blocks/do-blocks-expected.html' );
+
+               $actual_html = do_blocks( $original_html );
+
+               $this->assertEquals( $expected_html, $actual_html );
+       }
+
+       /**
+        * @ticket 45109
+        */
+       public function test_the_content() {
+               add_shortcode( 'someshortcode', array( $this, 'handle_shortcode' ) );
+
+               $classic_content = "Foo\n\n[someshortcode]\n\nBar\n\n[/someshortcode]\n\nBaz";
+               $block_content   = "<!-- wp:core/paragraph -->\n<p>Foo</p>\n<!-- /wp:core/paragraph -->\n\n<!-- wp:core/shortcode -->[someshortcode]\n\nBar\n\n[/someshortcode]<!-- /wp:core/shortcode -->\n\n<!-- wp:core/paragraph -->\n<p>Baz</p>\n<!-- /wp:core/paragraph -->";
+
+               $classic_filtered_content = apply_filters( 'the_content', $classic_content );
+               $block_filtered_content   = apply_filters( 'the_content', $block_content );
+
+               // Block rendering add some extra blank lines, but we're not worried about them.
+               $block_filtered_content = preg_replace( "/\n{2,}/", "\n", $block_filtered_content );
+
+               $this->assertEquals( $classic_filtered_content, $block_filtered_content );
+       }
+
+       function handle_shortcode( $atts, $content ) {
+               return $content;
+       }
+
+       /**
+        * @ticket 45109
+        */
+       public function data_do_block_test_filenames() {
+               self::$fixtures_dir = DIR_TESTDATA . '/blocks/fixtures';
+
+               $fixture_filenames = array_merge(
+                       glob( self::$fixtures_dir . '/*.json' ),
+                       glob( self::$fixtures_dir . '/*.html' )
+               );
+
+               $fixture_filenames = array_values(
+                       array_unique(
+                               array_map(
+                                       array( $this, 'clean_fixture_filename' ),
+                                       $fixture_filenames
+                               )
+                       )
+               );
+
+               return array_map(
+                       array( $this, 'pass_parser_fixture_filenames' ),
+                       $fixture_filenames
+               );      }
+
+       /**
+        * @dataProvider data_do_block_test_filenames
+        * @ticket 45109
+        */
+       public function test_do_block_output( $html_filename, $server_html_filename ) {
+               $html_path         = self::$fixtures_dir . '/' . $html_filename;
+               $server_html_path = self::$fixtures_dir . '/' . $server_html_filename;
+
+               foreach ( array( $html_path, $server_html_path ) as $filename ) {
+                       if ( ! file_exists( $filename ) ) {
+                               throw new Exception( "Missing fixture file: '$filename'" );
+                       }
+               }
+
+               $html          = do_blocks( self::strip_r( file_get_contents( $html_path ) ) );
+               $expected_html = self::strip_r( file_get_contents( $server_html_path ) );
+
+               $this->assertEquals(
+                       $expected_html,
+                       $html,
+                       "File '$html_path' does not match expected value"
+               );
+       }
+
+       /**
+        * @ticket 45109
+        */
+       public function test_dynamic_block_rendering() {
+               $settings = array(
+                       'render_callback' => array(
+                               $this,
+                               'render_test_block',
+                       ),
+               );
+               register_block_type( 'core/test', $settings );
+
+               // The duplicated dynamic blocks below are there to ensure that do_blocks() replaces each one-by-one.
+               $post_content =
+                       'before' .
+                       '<!-- wp:core/test {"value":"b1"} --><!-- /wp:core/test -->' .
+                       '<!-- wp:core/test {"value":"b1"} --><!-- /wp:core/test -->' .
+                       'between' .
+                       '<!-- wp:core/test {"value":"b2"} /-->' .
+                       '<!-- wp:core/test {"value":"b2"} /-->' .
+                       'after';
+
+               $updated_post_content = do_blocks( $post_content );
+               $this->assertEquals(
+                       $updated_post_content,
+                       'before' .
+                       '1:b1' .
+                       '2:b1' .
+                       'between' .
+                       '3:b2' .
+                       '4:b2' .
+                       'after'
+               );
+       }
+
+       /**
+        * @ticket 45109
+        */
+       public function test_global_post_persistence() {
+               global $post;
+
+               register_block_type(
+                       'core/test',
+                       array(
+                               'render_callback' => array(
+                                       $this,
+                                       'render_test_block_wp_query',
+                               ),
+                       )
+               );
+
+               $posts = self::factory()->post->create_many( 5 );
+               $post  = get_post( end( $posts ) );
+
+               $global_post = $post;
+               do_blocks( '<!-- wp:core/test /-->' );
+
+               $this->assertEquals( $global_post, $post );
+       }
+
+       /**
+        * @ticket 45109
+        */
+       public function test_dynamic_block_renders_string() {
+               $settings = array(
+                       'render_callback' => array(
+                               $this,
+                               'render_test_block_numeric',
+                       ),
+               );
+
+               register_block_type( 'core/test', $settings );
+               $block_type = new WP_Block_Type( 'core/test', $settings );
+
+               $rendered = $block_type->render();
+
+               $this->assertSame( '10', $rendered );
+               $this->assertInternalType( 'string', $rendered );
+       }
+
+       /**
+        * Helper function to remove relative paths and extension from a filename, leaving just the fixture name.
+        *
+        * @since 5.0.0
+        *
+        * @param string $filename The filename to clean.
+        * @return string The cleaned fixture name.
+        */
+       protected function clean_fixture_filename( $filename ) {
+               $filename = basename( $filename );
+               $filename = preg_replace( '/\..+$/', '', $filename );
+               return $filename;
+       }
+
+       /**
+        * Helper function to return the filenames needed to test the parser output.
+        *
+        * @since 5.0.0
+        *
+        * @param string $filename The cleaned fixture name.
+        * @return array The input and expected output filenames for that fixture.
+        */
+       protected function pass_parser_fixture_filenames( $filename ) {
+               return array(
+                       "$filename.html",
+                       "$filename.server.html",
+               );
+       }
+
+       /**
+        * Helper function to remove '\r' characters from a string.
+        *
+        * @since 5.0.0
+        *
+        * @param string $input The string to remove '\r' from.
+        * @return string The input string, with '\r' characters removed.
+        */
+       protected function strip_r( $input ) {
+               return str_replace( "\r", '', $input );
+       }
+
+       /**
+        * Test block rendering function.
+        *
+        * @since 5.0.0
+        *
+        * @param array $attributes Block attributes.
+        * @return string Block output.
+        */
+       public function render_test_block( $attributes ) {
+               $this->test_block_instance_number += 1;
+               return $this->test_block_instance_number . ':' . $attributes['value'];
+       }
+
+       /**
+        * Test block rendering function, returning numeric value.
+        *
+        * @since 5.0.0
+        *
+        * @return int Block output.
+        */
+       public function render_test_block_numeric() {
+               return 10;
+       }
+
+       /**
+        * Test block rendering function, creating a new WP_Query instance.
+        *
+        * @since 5.0.0
+        *
+        * @return string Block output.
+        */
+       public function render_test_block_wp_query() {
+               $content = '';
+               $recent  = new WP_Query( array(
+                       'numberposts'      => 10,
+                       'orderby'          => 'ID',
+                       'order'            => 'DESC',
+                       'post_type'        => 'post',
+                       'post_status'      => 'draft, publish, future, pending, private',
+                       'suppress_filters' => true,
+               ) );
+
+               while ( $recent->have_posts() ) {
+                       $recent->the_post();
+
+                       $content .= get_the_title();
+               }
+
+               wp_reset_postdata();
+
+               return $content;
+       }
+
+}
</ins></span></pre></div>
<a id="branches50toolswebpackpackagesjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.0/tools/webpack/packages.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.0/tools/webpack/packages.js    2018-10-18 04:39:40 UTC (rev 43751)
+++ branches/5.0/tools/webpack/packages.js      2018-10-18 11:53:49 UTC (rev 43752)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -117,7 +117,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">        };
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        const phpFiles = {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                'block-serialization-default-parser/parser.php': 'wp-includes/class-wp-block-parser.php',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // Parser shouldn't be copied until nested block issues are resolved.
+               // 'block-serialization-default-parser/parser.php': 'wp-includes/class-wp-block-parser.php',
+               'block-library/src/archives/index.php': 'wp-includes/blocks/archives.php',
+               'block-library/src/block/index.php': 'wp-includes/blocks/block.php',
+               'block-library/src/categories/index.php': 'wp-includes/blocks/categories.php',
+               'block-library/src/latest-comments/index.php': 'wp-includes/blocks/latest-comments.php',
+               'block-library/src/latest-posts/index.php': 'wp-includes/blocks/latest-posts.php',
+               'block-library/src/shortcode/index.php': 'wp-includes/blocks/shortcode.php',
</ins><span class="cx" style="display: block; padding: 0 10px">         };
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        const externals = {
</span></span></pre>
</div>
</div>

</body>
</html>