From 83ddbfb6f878e433563fa184c218f11a030cb07c Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Thu, 9 May 2024 05:12:47 +0200 Subject: [PATCH] Add block class name to the list block (#56469) Adds the `wp-block-list` class name to the list block in the editor and front. This means that global styles applied to `core/list` affects the list block, instead of affecting all lists. Ensures that pre-existing list blocks use the class name on the front, `
    ` is transformed to `
      `. Deprecates the version of the list block that did not support `className`. The ` __experimentalSelector` on the list item block is changed to `.wp-block-list > li`, Updates tests and test fixtures that use the list block. Co-authored-by: carolinan Co-authored-by: tellthemachines Co-authored-by: mtias Co-authored-by: oandregal Co-authored-by: fabiankaegy --- docs/reference-guides/core-blocks.md | 2 +- lib/blocks.php | 2 +- .../__snapshots__/transforms.native.js.snap | 2 +- .../block-library/src/list-item/block.json | 2 +- packages/block-library/src/list/block.json | 2 - packages/block-library/src/list/deprecated.js | 89 ++++++++++- packages/block-library/src/list/index.php | 54 +++++++ .../test/__snapshots__/edit.native.js.snap | 22 +-- .../__snapshots__/transforms.native.js.snap | 6 +- .../src/list/test/edit.native.js | 48 +++--- .../src/list/test/transforms.native.js | 2 +- .../__snapshots__/transforms.native.js.snap | 2 +- post-content.php | 2 +- test/e2e/specs/editor/blocks/list.spec.js | 142 +++++++++--------- ...-paste-preformatted-in-list-1-chromium.txt | 2 +- .../specs/editor/various/writing-flow.spec.js | 2 +- .../blocks-raw-handling.test.js.snap | 6 +- test/integration/blocks-raw-handling.test.js | 6 +- .../core__list__deprecated-v0.serialized.html | 2 +- ...list__deprecated-v1-nested.serialized.html | 10 +- .../core__list__deprecated-v1.serialized.html | 2 +- .../core__list__deprecated-v2.serialized.html | 2 +- .../core__list__deprecated-v3-css-class.html | 3 + .../core__list__deprecated-v3-css-class.json | 60 ++++++++ ..._list__deprecated-v3-css-class.parsed.json | 11 ++ ...t__deprecated-v3-css-class.serialized.html | 25 +++ .../fixtures/blocks/core__list__ul.html | 2 +- .../blocks/core__list__ul.parsed.json | 4 +- .../blocks/core__list__ul.serialized.html | 2 +- .../fixtures/documents/apple-out.html | 6 +- .../fixtures/documents/evernote-out.html | 8 +- .../documents/google-docs-list-only-out.html | 4 +- .../fixtures/documents/google-docs-out.html | 6 +- .../google-docs-with-comments-out.html | 6 +- .../fixtures/documents/markdown-out.html | 6 +- .../fixtures/documents/ms-word-list-out.html | 2 +- .../documents/ms-word-online-out.html | 4 +- .../fixtures/documents/ms-word-out.html | 6 +- .../integration/blocks-raw-handling.native.js | 10 +- 39 files changed, 406 insertions(+), 168 deletions(-) create mode 100644 packages/block-library/src/list/index.php create mode 100644 test/integration/fixtures/blocks/core__list__deprecated-v3-css-class.html create mode 100644 test/integration/fixtures/blocks/core__list__deprecated-v3-css-class.json create mode 100644 test/integration/fixtures/blocks/core__list__deprecated-v3-css-class.parsed.json create mode 100644 test/integration/fixtures/blocks/core__list__deprecated-v3-css-class.serialized.html diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 3a0a88048e982f..c08869db34b484 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -415,7 +415,7 @@ Create a bulleted or numbered list. ([Source](https://github.com/WordPress/guten - **Name:** core/list - **Category:** text - **Allowed Blocks:** core/list-item -- **Supports:** __unstablePasteTextInline, anchor, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~className~~, ~~html~~ +- **Supports:** __unstablePasteTextInline, anchor, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ - **Attributes:** ordered, placeholder, reversed, start, type, values ## List item diff --git a/lib/blocks.php b/lib/blocks.php index eed9142db436a0..679219cc6ff774 100644 --- a/lib/blocks.php +++ b/lib/blocks.php @@ -26,7 +26,6 @@ function gutenberg_reregister_core_block_types() { 'form-submit-button', 'group', 'html', - 'list', 'list-item', 'missing', 'more', @@ -76,6 +75,7 @@ function gutenberg_reregister_core_block_types() { 'heading.php' => 'core/heading', 'latest-comments.php' => 'core/latest-comments', 'latest-posts.php' => 'core/latest-posts', + 'list.php' => 'core/list', 'loginout.php' => 'core/loginout', 'media-text.php' => 'core/media-text', 'navigation.php' => 'core/navigation', diff --git a/packages/block-library/src/heading/test/__snapshots__/transforms.native.js.snap b/packages/block-library/src/heading/test/__snapshots__/transforms.native.js.snap index 4f6512b3f86625..c773f863077715 100644 --- a/packages/block-library/src/heading/test/__snapshots__/transforms.native.js.snap +++ b/packages/block-library/src/heading/test/__snapshots__/transforms.native.js.snap @@ -20,7 +20,7 @@ exports[`Heading block transforms to Group block 1`] = ` exports[`Heading block transforms to List block 1`] = ` " -
        +
        • Example text
        " diff --git a/packages/block-library/src/list-item/block.json b/packages/block-library/src/list-item/block.json index 3acaf2a3bb29b2..92822c993589d3 100644 --- a/packages/block-library/src/list-item/block.json +++ b/packages/block-library/src/list-item/block.json @@ -21,8 +21,8 @@ }, "supports": { "className": false, + "__experimentalSelector": ".wp-block-list > li", "splitting": true, - "__experimentalSelector": "li", "spacing": { "margin": true, "padding": true, diff --git a/packages/block-library/src/list/block.json b/packages/block-library/src/list/block.json index 8e6ff21e5bd10a..157aaf7c0cf633 100644 --- a/packages/block-library/src/list/block.json +++ b/packages/block-library/src/list/block.json @@ -39,7 +39,6 @@ "supports": { "anchor": true, "html": false, - "className": false, "typography": { "fontSize": true, "lineHeight": true, @@ -70,7 +69,6 @@ } }, "__unstablePasteTextInline": true, - "__experimentalSelector": "ol,ul", "__experimentalOnMerge": true, "__experimentalSlashInserter": true, "interactivity": { diff --git a/packages/block-library/src/list/deprecated.js b/packages/block-library/src/list/deprecated.js index cecc17430f65e5..edb04dff27c904 100644 --- a/packages/block-library/src/list/deprecated.js +++ b/packages/block-library/src/list/deprecated.js @@ -219,6 +219,93 @@ const v2 = { migrate: migrateTypeToInlineStyle, }; +// Version without block support 'className: true'. +const v3 = { + attributes: { + ordered: { + type: 'boolean', + default: false, + __experimentalRole: 'content', + }, + values: { + type: 'string', + source: 'html', + selector: 'ol,ul', + multiline: 'li', + __unstableMultilineWrapperTags: [ 'ol', 'ul' ], + default: '', + __experimentalRole: 'content', + }, + type: { + type: 'string', + }, + start: { + type: 'number', + }, + reversed: { + type: 'boolean', + }, + placeholder: { + type: 'string', + }, + }, + supports: { + anchor: true, + className: false, + typography: { + fontSize: true, + lineHeight: true, + __experimentalFontFamily: true, + __experimentalFontWeight: true, + __experimentalFontStyle: true, + __experimentalTextTransform: true, + __experimentalTextDecoration: true, + __experimentalLetterSpacing: true, + __experimentalDefaultControls: { + fontSize: true, + }, + }, + color: { + gradients: true, + link: true, + __experimentalDefaultControls: { + background: true, + text: true, + }, + }, + spacing: { + margin: true, + padding: true, + __experimentalDefaultControls: { + margin: false, + padding: false, + }, + }, + __unstablePasteTextInline: true, + __experimentalSelector: 'ol,ul', + __experimentalOnMerge: 'true', + __experimentalSlashInserter: true, + }, + save( { attributes } ) { + const { ordered, type, reversed, start } = attributes; + const TagName = ordered ? 'ol' : 'ul'; + return ( + + + + ); + }, +}; + /** * New deprecations need to be placed first * for them to have higher priority. @@ -227,4 +314,4 @@ const v2 = { * * See block-deprecation.md */ -export default [ v2, v1, v0 ]; +export default [ v3, v2, v1, v0 ]; diff --git a/packages/block-library/src/list/index.php b/packages/block-library/src/list/index.php new file mode 100644 index 00000000000000..1bffd813248575 --- /dev/null +++ b/packages/block-library/src/list/index.php @@ -0,0 +1,54 @@ + is transformed to
          . + * + * @since 6.6.0 + * + * @see https://github.com/WordPress/gutenberg/issues/12420 + * + * @param array $attributes Attributes of the block being rendered. + * @param string $content Content of the block being rendered. + * + * @return string The content of the block being rendered. + */ +function block_core_list_render( $attributes, $content ) { + if ( ! $content ) { + return $content; + } + + $processor = new WP_HTML_Tag_Processor( $content ); + + $list_tags = array( 'OL', 'UL' ); + while ( $processor->next_tag() ) { + if ( in_array( $processor->get_tag(), $list_tags, true ) ) { + $processor->add_class( 'wp-block-list' ); + break; + } + } + + return $processor->get_updated_html(); +} + +/** + * Registers the `core/list` block on server. + * + * @since 6.6.0 + */ +function register_block_core_list() { + register_block_type_from_metadata( + __DIR__ . '/list', + array( + 'render_callback' => 'block_core_list_render', + ) + ); +} + +add_action( 'init', 'register_block_core_list' ); diff --git a/packages/block-library/src/list/test/__snapshots__/edit.native.js.snap b/packages/block-library/src/list/test/__snapshots__/edit.native.js.snap index 1bc5cf6ce937f8..058ccc6b9ca635 100644 --- a/packages/block-library/src/list/test/__snapshots__/edit.native.js.snap +++ b/packages/block-library/src/list/test/__snapshots__/edit.native.js.snap @@ -2,7 +2,7 @@ exports[`List block adds one item to the list 1`] = ` " -
            +
            • First list item
            " @@ -10,9 +10,9 @@ exports[`List block adds one item to the list 1`] = ` exports[`List block changes the indentation level 1`] = ` " -
              +
              • Item 1 -
                  +
                  • Item 2
                  @@ -22,7 +22,7 @@ exports[`List block changes the indentation level 1`] = ` exports[`List block changes to ordered list 1`] = ` " -
                    +
                    1. Item 1
                    2. @@ -38,7 +38,7 @@ exports[`List block changes to ordered list 1`] = ` exports[`List block changes to reverse ordered list 1`] = ` " -
                        +
                        1. Item 1
                        2. @@ -54,7 +54,7 @@ exports[`List block changes to reverse ordered list 1`] = ` exports[`List block inserts block 1`] = ` " -
                            +
                            " @@ -62,7 +62,7 @@ exports[`List block inserts block 1`] = ` exports[`List block removes the indentation level 1`] = ` " -
                              +
                              • Item 1
                              • @@ -74,7 +74,7 @@ exports[`List block removes the indentation level 1`] = ` exports[`List block sets a start value to an ordered list 1`] = ` " -
                                  +
                                  1. Item 1
                                  2. @@ -90,19 +90,19 @@ exports[`List block sets a start value to an ordered list 1`] = ` exports[`List block shows different indentation levels 1`] = ` " -
                                      +
                                      • List item 1
                                      • List item 2 -
                                          +
                                          • List item nested 1
                                          • List item nested 2 -
                                              +
                                              • Extra item 1
                                              • diff --git a/packages/block-library/src/list/test/__snapshots__/transforms.native.js.snap b/packages/block-library/src/list/test/__snapshots__/transforms.native.js.snap index 723d19a658366f..9e28f1c77de943 100644 --- a/packages/block-library/src/list/test/__snapshots__/transforms.native.js.snap +++ b/packages/block-library/src/list/test/__snapshots__/transforms.native.js.snap @@ -4,7 +4,7 @@ exports[`List block transforms to Columns block 1`] = ` "
                                                -
                                                  +
                                                  • First Item
                                                  • @@ -23,7 +23,7 @@ exports[`List block transforms to Columns block 1`] = ` exports[`List block transforms to Group block 1`] = ` "
                                                    -
                                                      +
                                                      • First Item
                                                      • @@ -69,7 +69,7 @@ exports[`List block transforms to Paragraph block 1`] = ` exports[`List block transforms to Quote block 1`] = ` "
                                                        -
                                                          +
                                                          • First Item
                                                          • diff --git a/packages/block-library/src/list/test/edit.native.js b/packages/block-library/src/list/test/edit.native.js index 1f7296db98c8c3..a33bce32e5bca0 100644 --- a/packages/block-library/src/list/test/edit.native.js +++ b/packages/block-library/src/list/test/edit.native.js @@ -60,7 +60,7 @@ describe( 'List block', () => { it( 'adds one item to the list', async () => { const initialHtml = ` -
                                                              +
                                                              `; @@ -88,17 +88,17 @@ describe( 'List block', () => { it( 'shows different indentation levels', async () => { const initialHtml = ` -
                                                                +
                                                                • List item 1
                                                                • List item 2 -
                                                                    +
                                                                    • List item nested 1
                                                                    • List item nested 2 -
                                                                        +
                                                                        • Extra item 1
                                                                        • @@ -140,7 +140,7 @@ describe( 'List block', () => { it( 'changes the indentation level', async () => { const initialHtml = ` -
                                                                            +
                                                                            • Item 1
                                                                            • @@ -183,9 +183,9 @@ describe( 'List block', () => { it( 'removes the indentation level', async () => { const initialHtml = ` -
                                                                                +
                                                                                • Item 1 -
                                                                                    +
                                                                                    • Item 2
                                                                                    @@ -230,7 +230,7 @@ describe( 'List block', () => { it( 'changes to ordered list', async () => { const initialHtml = ` -
                                                                                      +
                                                                                      • Item 1
                                                                                      • @@ -258,7 +258,7 @@ describe( 'List block', () => { it( 'changes to reverse ordered list', async () => { const initialHtml = ` -
                                                                                          +
                                                                                          • Item 1
                                                                                          • @@ -299,7 +299,7 @@ describe( 'List block', () => { it( 'sets a start value to an ordered list', async () => { const initialHtml = ` -
                                                                                              +
                                                                                              • Item 1
                                                                                              • @@ -342,7 +342,7 @@ describe( 'List block', () => { it( 'splits empty list items into paragraphs', async () => { // Arrange const initialHtml = ` -
                                                                                                  +
                                                                                                  • One
                                                                                                  • Two
                                                                                                  @@ -370,7 +370,7 @@ describe( 'List block', () => { // Assert expect( getEditorHtml() ).toMatchInlineSnapshot( ` " -
                                                                                                    +
                                                                                                    • One
                                                                                                    @@ -380,7 +380,7 @@ describe( 'List block', () => { -
                                                                                                      +
                                                                                                      • Two
                                                                                                      " @@ -389,7 +389,7 @@ describe( 'List block', () => { it( 'merges paragraphs into list items', async () => { const initialHtml = ` -
                                                                                                        +
                                                                                                        • One
                                                                                                        @@ -399,7 +399,7 @@ describe( 'List block', () => { -
                                                                                                          +
                                                                                                          • Three
                                                                                                          `; @@ -417,7 +417,7 @@ describe( 'List block', () => { // Assert expect( getEditorHtml() ).toMatchInlineSnapshot( ` " -
                                                                                                            +
                                                                                                            • One
                                                                                                            • @@ -435,7 +435,7 @@ describe( 'List block', () => { it( 'merges lists into lists', async () => { // Arrange const initialHtml = ` -
                                                                                                                +
                                                                                                                • One
                                                                                                                • @@ -445,7 +445,7 @@ describe( 'List block', () => { -
                                                                                                                    +
                                                                                                                    • Three
                                                                                                                    `; @@ -466,7 +466,7 @@ describe( 'List block', () => { // Assert expect( getEditorHtml() ).toMatchInlineSnapshot( ` " -
                                                                                                                      +
                                                                                                                      • One
                                                                                                                      • @@ -486,7 +486,7 @@ describe( 'List block', () => {

                                                                                                                        A quick brown fox.

                                                                                                                        -
                                                                                                                          +
                                                                                                                          • One
                                                                                                                          • Two
                                                                                                                          `; @@ -527,7 +527,7 @@ describe( 'List block', () => { -
                                                                                                                            +
                                                                                                                            • Two
                                                                                                                            " @@ -539,9 +539,9 @@ describe( 'List block', () => {

                                                                                                                            A quick brown fox.

                                                                                                                            -
                                                                                                                              +
                                                                                                                              • One -
                                                                                                                                  +
                                                                                                                                  • Two
                                                                                                                                  • @@ -591,7 +591,7 @@ describe( 'List block', () => { -
                                                                                                                                      +
                                                                                                                                      • Two
                                                                                                                                      • diff --git a/packages/block-library/src/list/test/transforms.native.js b/packages/block-library/src/list/test/transforms.native.js index dd8ec5ccd2c772..538d5b7ed0193e 100644 --- a/packages/block-library/src/list/test/transforms.native.js +++ b/packages/block-library/src/list/test/transforms.native.js @@ -12,7 +12,7 @@ import { const block = 'List'; const initialHtml = ` -
                                                                                                                                          +
                                                                                                                                          • First Item
                                                                                                                                          • diff --git a/packages/block-library/src/paragraph/test/__snapshots__/transforms.native.js.snap b/packages/block-library/src/paragraph/test/__snapshots__/transforms.native.js.snap index b0855c02bd0e96..3a2a928b81f5e8 100644 --- a/packages/block-library/src/paragraph/test/__snapshots__/transforms.native.js.snap +++ b/packages/block-library/src/paragraph/test/__snapshots__/transforms.native.js.snap @@ -32,7 +32,7 @@ exports[`Paragraph block transforms to Heading block 1`] = ` exports[`Paragraph block transforms to List block 1`] = ` " -
                                                                                                                                              +
                                                                                                                                              • Example text
                                                                                                                                              " diff --git a/post-content.php b/post-content.php index 0bdeb30733f6cd..3c9b18087b0e84 100644 --- a/post-content.php +++ b/post-content.php @@ -61,7 +61,7 @@ -
                                                                                                                                                +
                                                                                                                                                • diff --git a/test/e2e/specs/editor/blocks/list.spec.js b/test/e2e/specs/editor/blocks/list.spec.js index 10f25d6b3609f0..7c42ad7989aff9 100644 --- a/test/e2e/specs/editor/blocks/list.spec.js +++ b/test/e2e/specs/editor/blocks/list.spec.js @@ -24,7 +24,7 @@ test.describe( 'List (@firefox)', () => { await pageUtils.pressKeys( 'primary+v' ); const copied = ` -
                                                                                                                                                    +
                                                                                                                                                    • one
                                                                                                                                                    • @@ -53,7 +53,7 @@ test.describe( 'List (@firefox)', () => { await page.keyboard.type( 'Another list item' ); await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                        +
                                                                                                                                                        • A list item
                                                                                                                                                        • @@ -78,7 +78,7 @@ test.describe( 'List (@firefox)', () => { await page.keyboard.type( '* ' ); await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                            +
                                                                                                                                                            • test
                                                                                                                                                            ` @@ -97,7 +97,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                              +
                                                                                                                                                              1. A list item
                                                                                                                                                              ` @@ -264,7 +264,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                +
                                                                                                                                                                • I’m a list
                                                                                                                                                                ` @@ -283,7 +283,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                  +
                                                                                                                                                                  • test
                                                                                                                                                                  ` @@ -309,7 +309,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                    +
                                                                                                                                                                    • one
                                                                                                                                                                    • @@ -335,7 +335,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                        +
                                                                                                                                                                        • one
                                                                                                                                                                        • @@ -368,7 +368,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                            +
                                                                                                                                                                            • one
                                                                                                                                                                              ...
                                                                                                                                                                            • @@ -433,7 +433,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( `
                                                                                                                                                                              -
                                                                                                                                                                                +
                                                                                                                                                                                • one
                                                                                                                                                                                • @@ -457,7 +457,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                    +
                                                                                                                                                                                    • one
                                                                                                                                                                                    @@ -473,7 +473,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                      +
                                                                                                                                                                                      • one
                                                                                                                                                                                      • @@ -498,7 +498,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                          +
                                                                                                                                                                                          • one
                                                                                                                                                                                          • @@ -516,7 +516,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                              +
                                                                                                                                                                                              • one
                                                                                                                                                                                              @@ -526,7 +526,7 @@ test.describe( 'List (@firefox)', () => { -
                                                                                                                                                                                                +
                                                                                                                                                                                                • two
                                                                                                                                                                                                ` @@ -541,7 +541,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                  +
                                                                                                                                                                                                  • one
                                                                                                                                                                                                  • @@ -637,7 +637,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                      +
                                                                                                                                                                                                      1. one
                                                                                                                                                                                                      @@ -647,7 +647,7 @@ test.describe( 'List (@firefox)', () => { -
                                                                                                                                                                                                        +
                                                                                                                                                                                                        1. two
                                                                                                                                                                                                        ` @@ -665,9 +665,9 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                          +
                                                                                                                                                                                                          • one -
                                                                                                                                                                                                              +
                                                                                                                                                                                                              • two
                                                                                                                                                                                                              • @@ -691,9 +691,9 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  • one -
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      @@ -708,7 +708,7 @@ test.describe( 'List (@firefox)', () => { await editor.clickBlockToolbarButton( 'Ordered' ); await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        ` @@ -729,9 +729,9 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          • a -
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              1. 1
                                                                                                                                                                                                                              @@ -754,7 +754,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( `
                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                • aaa
                                                                                                                                                                                                                                @@ -775,9 +775,9 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  • a -
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      • 1
                                                                                                                                                                                                                                      @@ -789,7 +789,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        • a
                                                                                                                                                                                                                                        • @@ -812,11 +812,11 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            • a -
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                • 1 -
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    • i
                                                                                                                                                                                                                                                    @@ -830,9 +830,9 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      • a -
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          • 1
                                                                                                                                                                                                                                                          • @@ -851,9 +851,9 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              • a -
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  • 1
                                                                                                                                                                                                                                                                  @@ -882,11 +882,11 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    • a -
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        • b -
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            • c
                                                                                                                                                                                                                                                                            @@ -901,13 +901,13 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              • a
                                                                                                                                                                                                                                                                              • b -
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  • c
                                                                                                                                                                                                                                                                                  @@ -927,7 +927,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    • a
                                                                                                                                                                                                                                                                                    ` @@ -950,7 +950,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      • a
                                                                                                                                                                                                                                                                                      • @@ -981,11 +981,11 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          • 1 -
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              • a -
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  • i
                                                                                                                                                                                                                                                                                                  @@ -1000,9 +1000,9 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    • 1 -
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        • a
                                                                                                                                                                                                                                                                                                        • @@ -1018,9 +1018,9 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            • 1 -
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                • a
                                                                                                                                                                                                                                                                                                                @@ -1036,9 +1036,9 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  • 1 -
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      • a
                                                                                                                                                                                                                                                                                                                      @@ -1051,7 +1051,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        • 1
                                                                                                                                                                                                                                                                                                                        • @@ -1065,7 +1065,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            • 1
                                                                                                                                                                                                                                                                                                                            ` @@ -1098,13 +1098,13 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              • 1
                                                                                                                                                                                                                                                                                                                              • 2 -
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  • a
                                                                                                                                                                                                                                                                                                                                  @@ -1128,7 +1128,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    • 1
                                                                                                                                                                                                                                                                                                                                    • @@ -1182,9 +1182,9 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        • 1 -
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            • 2
                                                                                                                                                                                                                                                                                                                                            • @@ -1208,9 +1208,9 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                • 1 -
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    • 2
                                                                                                                                                                                                                                                                                                                                                    • @@ -1243,7 +1243,7 @@ test.describe( 'List (@firefox)', () => { -
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        • 2
                                                                                                                                                                                                                                                                                                                                                        ` @@ -1267,7 +1267,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          1. 1
                                                                                                                                                                                                                                                                                                                                                          2. @@ -1299,7 +1299,7 @@ test.describe( 'List (@firefox)', () => { await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              • a
                                                                                                                                                                                                                                                                                                                                                              • @@ -1325,7 +1325,7 @@ test.describe( 'List (@firefox)', () => { // Add empty list block await page.getByPlaceholder( 'Start writing with text or HTML' ) .fill( ` -
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  ` ); @@ -1335,7 +1335,7 @@ test.describe( 'List (@firefox)', () => { // Verify no WSOD and content is proper. expect( await editor.getEditedPostContent() ).toBe( ` -
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    ` ); @@ -1356,7 +1356,7 @@ test.describe( 'List (@firefox)', () => { await page.keyboard.type( '* c' ); await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      • a
                                                                                                                                                                                                                                                                                                                                                                      • @@ -1366,7 +1366,7 @@ test.describe( 'List (@firefox)', () => { -
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          • c
                                                                                                                                                                                                                                                                                                                                                                          ` ); @@ -1375,7 +1375,7 @@ test.describe( 'List (@firefox)', () => { await page.keyboard.press( 'Backspace' ); await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            • a
                                                                                                                                                                                                                                                                                                                                                                            • @@ -1398,7 +1398,7 @@ test.describe( 'List (@firefox)', () => { await page.keyboard.type( '1' ); expect( await editor.getEditedPostContent() ).toBe( ` -
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                @@ -1439,7 +1439,7 @@ test.describe( 'List (@firefox)', () => { await page.getByRole( 'menuitem', { name: 'List' } ).click(); expect( await editor.getEditedPostContent() ).toBe( ` -
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  • 1
                                                                                                                                                                                                                                                                                                                                                                                  • diff --git a/test/e2e/specs/editor/various/__snapshots__/Copy-cut-paste-should-paste-preformatted-in-list-1-chromium.txt b/test/e2e/specs/editor/various/__snapshots__/Copy-cut-paste-should-paste-preformatted-in-list-1-chromium.txt index 002e7a19200283..d46df0dfb55d44 100644 --- a/test/e2e/specs/editor/various/__snapshots__/Copy-cut-paste-should-paste-preformatted-in-list-1-chromium.txt +++ b/test/e2e/specs/editor/various/__snapshots__/Copy-cut-paste-should-paste-preformatted-in-list-1-chromium.txt @@ -1,5 +1,5 @@ -
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      • xy
                                                                                                                                                                                                                                                                                                                                                                                      \ No newline at end of file diff --git a/test/e2e/specs/editor/various/writing-flow.spec.js b/test/e2e/specs/editor/various/writing-flow.spec.js index 91aafa43690fd2..2dee26255c103b 100644 --- a/test/e2e/specs/editor/various/writing-flow.spec.js +++ b/test/e2e/specs/editor/various/writing-flow.spec.js @@ -356,7 +356,7 @@ test.describe( 'Writing Flow (@firefox, @webkit)', () => { await page.keyboard.type( 'a' ); await page.keyboard.press( 'Backspace' ); await expect.poll( editor.getEditedPostContent ).toBe( ` -
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        ` ); diff --git a/test/integration/__snapshots__/blocks-raw-handling.test.js.snap b/test/integration/__snapshots__/blocks-raw-handling.test.js.snap index b810a20b4d7c52..589eef78f34e21 100644 --- a/test/integration/__snapshots__/blocks-raw-handling.test.js.snap +++ b/test/integration/__snapshots__/blocks-raw-handling.test.js.snap @@ -135,7 +135,7 @@ exports[`rawHandler should convert HTML post to blocks with minimal content chan -
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          1. Item
                                                                                                                                                                                                                                                                                                                                                                                          @@ -177,9 +177,9 @@ exports[`rawHandler should convert a caption shortcode with link 1`] = ` exports[`rawHandler should convert a list with attributes 1`] = ` " -
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            1. 1 -
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                1. 1
                                                                                                                                                                                                                                                                                                                                                                                                diff --git a/test/integration/blocks-raw-handling.test.js b/test/integration/blocks-raw-handling.test.js index 5fb7123f9b820a..81d3b7053468be 100644 --- a/test/integration/blocks-raw-handling.test.js +++ b/test/integration/blocks-raw-handling.test.js @@ -177,7 +177,7 @@ describe( 'Blocks raw handling', () => { .join( '' ); expect( filtered ).toMatchInlineSnapshot( ` - "
                                                                                                                                                                                                                                                                                                                                                                                                  + "
                                                                                                                                                                                                                                                                                                                                                                                                  • one
                                                                                                                                                                                                                                                                                                                                                                                                  • @@ -202,7 +202,7 @@ describe( 'Blocks raw handling', () => { .join( '' ); expect( filtered ).toMatchInlineSnapshot( ` - "
                                                                                                                                                                                                                                                                                                                                                                                                      + "
                                                                                                                                                                                                                                                                                                                                                                                                      • one
                                                                                                                                                                                                                                                                                                                                                                                                      • @@ -318,7 +318,7 @@ describe( 'Blocks raw handling', () => { .join( '' ); expect( filtered ).toMatchInlineSnapshot( ` - "
                                                                                                                                                                                                                                                                                                                                                                                                          + "
                                                                                                                                                                                                                                                                                                                                                                                                          • One
                                                                                                                                                                                                                                                                                                                                                                                                          • diff --git a/test/integration/fixtures/blocks/core__list__deprecated-v0.serialized.html b/test/integration/fixtures/blocks/core__list__deprecated-v0.serialized.html index fa50fb5db17e7b..ad0919beb9bde4 100644 --- a/test/integration/fixtures/blocks/core__list__deprecated-v0.serialized.html +++ b/test/integration/fixtures/blocks/core__list__deprecated-v0.serialized.html @@ -1,5 +1,5 @@ -
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              • one
                                                                                                                                                                                                                                                                                                                                                                                                              • diff --git a/test/integration/fixtures/blocks/core__list__deprecated-v1-nested.serialized.html b/test/integration/fixtures/blocks/core__list__deprecated-v1-nested.serialized.html index 61e33d3dc0e156..39a3efa2eabed8 100644 --- a/test/integration/fixtures/blocks/core__list__deprecated-v1-nested.serialized.html +++ b/test/integration/fixtures/blocks/core__list__deprecated-v1-nested.serialized.html @@ -1,9 +1,9 @@ -
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  • Item -
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      • Item -
                                                                                                                                                                                                                                                                                                                                                                                                                          + @@ -11,7 +11,7 @@
                                                                                                                                                                                                                                                                                                                                                                                                                        • Item -
                                                                                                                                                                                                                                                                                                                                                                                                                            + @@ -19,7 +19,7 @@
                                                                                                                                                                                                                                                                                                                                                                                                                          • Item -
                                                                                                                                                                                                                                                                                                                                                                                                                              + diff --git a/test/integration/fixtures/blocks/core__list__deprecated-v1.serialized.html b/test/integration/fixtures/blocks/core__list__deprecated-v1.serialized.html index c09708d51db0bb..4d74394771fcb5 100644 --- a/test/integration/fixtures/blocks/core__list__deprecated-v1.serialized.html +++ b/test/integration/fixtures/blocks/core__list__deprecated-v1.serialized.html @@ -1,5 +1,5 @@ -
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                • Text & Headings
                                                                                                                                                                                                                                                                                                                                                                                                                                • diff --git a/test/integration/fixtures/blocks/core__list__deprecated-v2.serialized.html b/test/integration/fixtures/blocks/core__list__deprecated-v2.serialized.html index 44c97ca29209cf..6fdf3ad84feeb9 100644 --- a/test/integration/fixtures/blocks/core__list__deprecated-v2.serialized.html +++ b/test/integration/fixtures/blocks/core__list__deprecated-v2.serialized.html @@ -1,5 +1,5 @@ -
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    1. Item 1
                                                                                                                                                                                                                                                                                                                                                                                                                                    diff --git a/test/integration/fixtures/blocks/core__list__deprecated-v3-css-class.html b/test/integration/fixtures/blocks/core__list__deprecated-v3-css-class.html new file mode 100644 index 00000000000000..aef6bf669f2c98 --- /dev/null +++ b/test/integration/fixtures/blocks/core__list__deprecated-v3-css-class.html @@ -0,0 +1,3 @@ + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Text & Headings
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Images & Videos
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Galleries
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Embeds, like YouTube, Tweets, or other WordPress posts.
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Layout blocks, like Buttons, Hero Images, Separators, etc.
                                                                                                                                                                                                                                                                                                                                                                                                                                    • And Lists like this one of course :)
                                                                                                                                                                                                                                                                                                                                                                                                                                    + diff --git a/test/integration/fixtures/blocks/core__list__deprecated-v3-css-class.json b/test/integration/fixtures/blocks/core__list__deprecated-v3-css-class.json new file mode 100644 index 00000000000000..80cd87e4eb69e8 --- /dev/null +++ b/test/integration/fixtures/blocks/core__list__deprecated-v3-css-class.json @@ -0,0 +1,60 @@ +[ + { + "name": "core/list", + "isValid": true, + "attributes": { + "ordered": false, + "values": "" + }, + "innerBlocks": [ + { + "name": "core/list-item", + "isValid": true, + "attributes": { + "content": "Text & Headings" + }, + "innerBlocks": [] + }, + { + "name": "core/list-item", + "isValid": true, + "attributes": { + "content": "Images & Videos" + }, + "innerBlocks": [] + }, + { + "name": "core/list-item", + "isValid": true, + "attributes": { + "content": "Galleries" + }, + "innerBlocks": [] + }, + { + "name": "core/list-item", + "isValid": true, + "attributes": { + "content": "Embeds, like YouTube, Tweets, or other WordPress posts." + }, + "innerBlocks": [] + }, + { + "name": "core/list-item", + "isValid": true, + "attributes": { + "content": "Layout blocks, like Buttons, Hero Images, Separators, etc." + }, + "innerBlocks": [] + }, + { + "name": "core/list-item", + "isValid": true, + "attributes": { + "content": "And Lists like this one of course :)" + }, + "innerBlocks": [] + } + ] + } +] diff --git a/test/integration/fixtures/blocks/core__list__deprecated-v3-css-class.parsed.json b/test/integration/fixtures/blocks/core__list__deprecated-v3-css-class.parsed.json new file mode 100644 index 00000000000000..427f4c3a975cfd --- /dev/null +++ b/test/integration/fixtures/blocks/core__list__deprecated-v3-css-class.parsed.json @@ -0,0 +1,11 @@ +[ + { + "blockName": "core/list", + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Text & Headings
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Images & Videos
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Galleries
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Embeds, like YouTube, Tweets, or other WordPress posts.
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Layout blocks, like Buttons, Hero Images, Separators, etc.
                                                                                                                                                                                                                                                                                                                                                                                                                                    • And Lists like this one of course :)
                                                                                                                                                                                                                                                                                                                                                                                                                                    \n", + "innerContent": [ + "\n
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Text & Headings
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Images & Videos
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Galleries
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Embeds, like YouTube, Tweets, or other WordPress posts.
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Layout blocks, like Buttons, Hero Images, Separators, etc.
                                                                                                                                                                                                                                                                                                                                                                                                                                    • And Lists like this one of course :)
                                                                                                                                                                                                                                                                                                                                                                                                                                    \n" + ] + } +] diff --git a/test/integration/fixtures/blocks/core__list__deprecated-v3-css-class.serialized.html b/test/integration/fixtures/blocks/core__list__deprecated-v3-css-class.serialized.html new file mode 100644 index 00000000000000..4d74394771fcb5 --- /dev/null +++ b/test/integration/fixtures/blocks/core__list__deprecated-v3-css-class.serialized.html @@ -0,0 +1,25 @@ + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Text & Headings
                                                                                                                                                                                                                                                                                                                                                                                                                                    • + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Images & Videos
                                                                                                                                                                                                                                                                                                                                                                                                                                    • + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Galleries
                                                                                                                                                                                                                                                                                                                                                                                                                                    • + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Embeds, like YouTube, Tweets, or other WordPress posts.
                                                                                                                                                                                                                                                                                                                                                                                                                                    • + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Layout blocks, like Buttons, Hero Images, Separators, etc.
                                                                                                                                                                                                                                                                                                                                                                                                                                    • + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    • And Lists like this one of course :)
                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + diff --git a/test/integration/fixtures/blocks/core__list__ul.html b/test/integration/fixtures/blocks/core__list__ul.html index c09708d51db0bb..4d74394771fcb5 100644 --- a/test/integration/fixtures/blocks/core__list__ul.html +++ b/test/integration/fixtures/blocks/core__list__ul.html @@ -1,5 +1,5 @@ -
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Text & Headings
                                                                                                                                                                                                                                                                                                                                                                                                                                      • diff --git a/test/integration/fixtures/blocks/core__list__ul.parsed.json b/test/integration/fixtures/blocks/core__list__ul.parsed.json index 2853bc5558ebe3..4639b007c777b7 100644 --- a/test/integration/fixtures/blocks/core__list__ul.parsed.json +++ b/test/integration/fixtures/blocks/core__list__ul.parsed.json @@ -52,9 +52,9 @@ ] } ], - "innerHTML": "\n
                                                                                                                                                                                                                                                                                                                                                                                                                                          \n\n\n\n\n\n\n\n\n\n
                                                                                                                                                                                                                                                                                                                                                                                                                                        \n", + "innerHTML": "\n
                                                                                                                                                                                                                                                                                                                                                                                                                                          \n\n\n\n\n\n\n\n\n\n
                                                                                                                                                                                                                                                                                                                                                                                                                                        \n", "innerContent": [ - "\n
                                                                                                                                                                                                                                                                                                                                                                                                                                          ", + "\n
                                                                                                                                                                                                                                                                                                                                                                                                                                            ", null, "\n\n", null, diff --git a/test/integration/fixtures/blocks/core__list__ul.serialized.html b/test/integration/fixtures/blocks/core__list__ul.serialized.html index c09708d51db0bb..4d74394771fcb5 100644 --- a/test/integration/fixtures/blocks/core__list__ul.serialized.html +++ b/test/integration/fixtures/blocks/core__list__ul.serialized.html @@ -1,5 +1,5 @@ -
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Text & Headings
                                                                                                                                                                                                                                                                                                                                                                                                                                              • diff --git a/test/integration/fixtures/documents/apple-out.html b/test/integration/fixtures/documents/apple-out.html index afada0ee3136e8..d6112309af9f03 100644 --- a/test/integration/fixtures/documents/apple-out.html +++ b/test/integration/fixtures/documents/apple-out.html @@ -11,13 +11,13 @@ -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • A
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Bulleted -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Indented
                                                                                                                                                                                                                                                                                                                                                                                                                                                      @@ -29,7 +29,7 @@ -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        1. One
                                                                                                                                                                                                                                                                                                                                                                                                                                                        2. diff --git a/test/integration/fixtures/documents/evernote-out.html b/test/integration/fixtures/documents/evernote-out.html index a5ff509c7a1737..2a7212f2e29b3d 100644 --- a/test/integration/fixtures/documents/evernote-out.html +++ b/test/integration/fixtures/documents/evernote-out.html @@ -7,13 +7,13 @@ -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • An
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Unordered -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Indented
                                                                                                                                                                                                                                                                                                                                                                                                                                                                @@ -25,13 +25,13 @@ -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  1. One
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  2. Two -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      1. Indented
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/test/integration/fixtures/documents/google-docs-list-only-out.html b/test/integration/fixtures/documents/google-docs-list-only-out.html index 642dc168bb5bb9..ec14d44d2b9224 100644 --- a/test/integration/fixtures/documents/google-docs-list-only-out.html +++ b/test/integration/fixtures/documents/google-docs-list-only-out.html @@ -1,7 +1,7 @@ -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • My first list item -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • A sub list item
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • diff --git a/test/integration/fixtures/documents/google-docs-out.html b/test/integration/fixtures/documents/google-docs-out.html index f2ec15cf4f92ad..3ee7d25875abc6 100644 --- a/test/integration/fixtures/documents/google-docs-out.html +++ b/test/integration/fixtures/documents/google-docs-out.html @@ -11,13 +11,13 @@

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This is a heading

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • A
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Bulleted -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Indented
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @@ -29,7 +29,7 @@

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This is a heading

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      1. One
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2. diff --git a/test/integration/fixtures/documents/google-docs-with-comments-out.html b/test/integration/fixtures/documents/google-docs-with-comments-out.html index f2ec15cf4f92ad..3ee7d25875abc6 100644 --- a/test/integration/fixtures/documents/google-docs-with-comments-out.html +++ b/test/integration/fixtures/documents/google-docs-with-comments-out.html @@ -11,13 +11,13 @@

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        This is a heading

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • A
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Bulleted -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Indented
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @@ -29,7 +29,7 @@

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This is a heading

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                1. One
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2. diff --git a/test/integration/fixtures/documents/markdown-out.html b/test/integration/fixtures/documents/markdown-out.html index ed57e4e05e7176..9ed72f6d3ef6d3 100644 --- a/test/integration/fixtures/documents/markdown-out.html +++ b/test/integration/fixtures/documents/markdown-out.html @@ -15,13 +15,13 @@

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Lists

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • A
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Bulleted -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Indented
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @@ -33,7 +33,7 @@

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Lists

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          1. One
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2. diff --git a/test/integration/fixtures/documents/ms-word-list-out.html b/test/integration/fixtures/documents/ms-word-list-out.html index f57946f64bc985..2e55413b159a6a 100644 --- a/test/integration/fixtures/documents/ms-word-list-out.html +++ b/test/integration/fixtures/documents/ms-word-list-out.html @@ -7,7 +7,7 @@

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This is a headline?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • One
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • diff --git a/test/integration/fixtures/documents/ms-word-online-out.html b/test/integration/fixtures/documents/ms-word-online-out.html index 2d8314bbf0fd60..13698a929d9b13 100644 --- a/test/integration/fixtures/documents/ms-word-online-out.html +++ b/test/integration/fixtures/documents/ms-word-online-out.html @@ -7,7 +7,7 @@ -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • @@ -25,7 +25,7 @@ -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      1. One 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2. diff --git a/test/integration/fixtures/documents/ms-word-out.html b/test/integration/fixtures/documents/ms-word-out.html index 89eaa6f3bcd161..81b82b5f9502fe 100644 --- a/test/integration/fixtures/documents/ms-word-out.html +++ b/test/integration/fixtures/documents/ms-word-out.html @@ -19,13 +19,13 @@

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        This is a heading level 2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • A
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Bulleted -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Indented
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @@ -37,7 +37,7 @@

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This is a heading level 2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                1. One
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2. diff --git a/test/native/integration/blocks-raw-handling.native.js b/test/native/integration/blocks-raw-handling.native.js index 5f21ca035fbf9d..6fae0e72be0cac 100644 --- a/test/native/integration/blocks-raw-handling.native.js +++ b/test/native/integration/blocks-raw-handling.native.js @@ -187,7 +187,7 @@ describe( 'Blocks raw handling', () => { .join( '' ); expect( filtered ).toMatchInlineSnapshot( ` - "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • one
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • @@ -212,7 +212,7 @@ describe( 'Blocks raw handling', () => { .join( '' ); expect( filtered ).toMatchInlineSnapshot( ` - "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • one
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • @@ -309,7 +309,7 @@ describe( 'Blocks raw handling', () => { it( 'should treat single list item as inline text', () => { const filtered = pasteHandler( { - HTML: '
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Some bold text.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ', + HTML: '
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Some bold text.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ', plainText: 'Some bold text.\n', mode: 'AUTO', } ); @@ -320,7 +320,7 @@ describe( 'Blocks raw handling', () => { it( 'should treat multiple list items as a block', () => { const filtered = pasteHandler( { - HTML: '
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • One
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Two
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Three
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ', + HTML: '
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • One
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Two
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Three
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ', plainText: 'One\nTwo\nThree\n', mode: 'AUTO', } ) @@ -328,7 +328,7 @@ describe( 'Blocks raw handling', () => { .join( '' ); expect( filtered ).toMatchInlineSnapshot( ` - "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • One