Issue #3631203: Don't clone the content blocks of pattern previews

Closes #3631203

4.0.x counterpart of !301 (merged).

The duplicate check of content blocks (editor.BlockEdit filter in packages/filters/src/content-blocks.jsx) skips previews (isPreviewMode of the block editor settings), so previewing a pattern in the inserter no longer clones the content blocks it shows. Inserting a pattern still checks its content blocks and clones the used ones. The filter's console.log() calls are removed.

content-block-patterns.spec.mjs applies a test recipe (tests/recipes/gutenberg_test_content_block_patterns: a Basic content block used by an article, and a pattern with it), previews the pattern (no clone_if_used request), then inserts it (the block is cloned). It fails without the fix.

Merge request reports

Loading
Loading