Skip to content

Commit

Permalink
Merge pull request #1231 from willybahuaud/patch-1
Browse files Browse the repository at this point in the history
Use PCRE_DOTALL for do_blocks matcher regular expression to match newlines
  • Loading branch information
westonruter authored Jun 19, 2017
2 parents f65b8ac + e49d605 commit f47f55c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function do_blocks( $content ) {
global $wp_registered_blocks;

// Extract the blocks from the post content.
$matcher = '/<!--\s*wp:([a-z](?:[a-z0-9\/]+)*)\s+((?:(?!-->).)*)\s*\/?-->(?:.*?<!--\s*\/wp:\g1\s+-->)?/';
$matcher = '/<!--\s*wp:([a-z](?:[a-z0-9\/]+)*)\s+((?:(?!-->).)*)\s*\/?-->(?:.*?<!--\s*\/wp:\g1\s+-->)?/s';
preg_match_all( $matcher, $content, $matches, PREG_OFFSET_CAPTURE );

$new_content = $content;
Expand Down

0 comments on commit f47f55c

Please sign in to comment.