Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/block-library/src/gallery/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function block_core_gallery_render( $attributes, $content ) {

// This pattern matches figure elements with the `wp-block-image` class to
// avoid the gallery's wrapping `figure` element and extract images only.
$pattern = '/<figure[^>]*\bwp-block-image\b[^>]*>.*?<\/figure>/';
$pattern = '/<figure[^>]*\bwp-block-image\b[^>]*>.*?<\/figure>/s';

// Find all Image blocks.
preg_match_all( $pattern, $updated_content, $matches );
Expand Down
Loading