From 4ae4f0c048afe4489a350395ec6736a1f779e928 Mon Sep 17 00:00:00 2001 From: Filip Sobol Date: Fri, 12 May 2023 13:33:31 +0200 Subject: [PATCH 1/3] Remove the `' + + '' + + '' + + '' + + '' + + '' + + '' + + '
123
'; + + const documentFragment = htmlDataProcessor.toView( inputData ); + + removeStyleBlock( documentFragment, writer ); + + expect( htmlDataProcessor.toData( documentFragment ) ).to.equal( '
123
' ); + } ); + } ); +} ); From 540557725003f3196392749e4c71f2a50084b3a8 Mon Sep 17 00:00:00 2001 From: Filip Sobol Date: Fri, 12 May 2023 13:35:27 +0200 Subject: [PATCH 2/3] Update test name --- .../tests/filters/removestyleblock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ckeditor5-paste-from-office/tests/filters/removestyleblock.js b/packages/ckeditor5-paste-from-office/tests/filters/removestyleblock.js index 7acd0294508..ecf71738d55 100644 --- a/packages/ckeditor5-paste-from-office/tests/filters/removestyleblock.js +++ b/packages/ckeditor5-paste-from-office/tests/filters/removestyleblock.js @@ -20,7 +20,7 @@ describe( 'PasteFromOffice - filters', () => { writer = new UpcastWriter( viewDocument ); } ); - it( 'should remove google sheets element', () => { + it( 'should remove ' + '' + From 26a76e6ce19e48a31a770cb1b90e656a3ce37cec Mon Sep 17 00:00:00 2001 From: Filip Sobol Date: Thu, 18 May 2023 11:26:14 +0200 Subject: [PATCH 3/3] Test removing multiple `' + + '' + + '' + + '
' + + '' + + '' + + '' + + '' + + '' + + '
123
'; + + const documentFragment = htmlDataProcessor.toView( inputData ); + + removeStyleBlock( documentFragment, writer ); + + expect( htmlDataProcessor.toData( documentFragment ) ).to.equal( '
123
' ); + } ); + + it( 'works with multiple non-consecutive ' + + '' + + '' + + '' + + '' + + '' + + '' + + '
123
' + + ''; + + const documentFragment = htmlDataProcessor.toView( inputData ); + + removeStyleBlock( documentFragment, writer ); + + expect( htmlDataProcessor.toData( documentFragment ) ).to.equal( '
123
' ); + } ); } ); } );