|
|
@@ -59,33 +59,32 @@ describe( 'HtmlDataProcessor', () => {
|
|
|
} );
|
|
|
}
|
|
|
|
|
|
- // Uncomment this test after fixing #404.
|
|
|
- // describe( 'https://github.com/ckeditor/ckeditor5-clipboard/issues/2#issuecomment-310417731 + #404', () => {
|
|
|
- // it( 'does not lose whitespaces in Chrome\'s paste-like content', () => {
|
|
|
- // const fragment = dataProcessor.toView(
|
|
|
- // '<meta charset=\'utf-8\'>' +
|
|
|
- // '<span>This is the<span>\u00a0</span></span>' +
|
|
|
- // '<a href="url">third developer preview</a>' +
|
|
|
- // '<span><span>\u00a0</span>of<span>\u00a0</span></span>' +
|
|
|
- // '<strong>CKEditor\u00a05</strong>' +
|
|
|
- // '<span>.</span>'
|
|
|
- // );
|
|
|
-
|
|
|
- // expect( stringify( fragment ) ).to.equal(
|
|
|
- // '<span>This is the<span>\u00a0</span></span>' +
|
|
|
- // '<a href="url">third developer preview</a>' +
|
|
|
- // '<span><span>\u00a0</span>of<span>\u00a0</span></span>' +
|
|
|
- // '<strong>CKEditor\u00a05</strong>' +
|
|
|
- // '<span>.</span>'
|
|
|
- // );
|
|
|
-
|
|
|
- // // Just to be sure... stringify() uses conversion and the browser extensively,
|
|
|
- // // so it's not entirely safe.
|
|
|
- // expect( fragment.getChild( 0 ).getChild( 1 ).getChild( 0 ).data ).to.equal( '\u00a0' );
|
|
|
- // expect( fragment.getChild( 2 ).getChild( 0 ).getChild( 0 ).data ).to.equal( '\u00a0' );
|
|
|
- // expect( fragment.getChild( 2 ).getChild( 2 ).getChild( 0 ).data ).to.equal( '\u00a0' );
|
|
|
- // } );
|
|
|
- // } );
|
|
|
+ describe( 'https://github.com/ckeditor/ckeditor5-clipboard/issues/2#issuecomment-310417731 + #404', () => {
|
|
|
+ it( 'does not lose whitespaces in Chrome\'s paste-like content', () => {
|
|
|
+ const fragment = dataProcessor.toView(
|
|
|
+ '<meta charset=\'utf-8\'>' +
|
|
|
+ '<span>This is the<span>\u00a0</span></span>' +
|
|
|
+ '<a href="url">third developer preview</a>' +
|
|
|
+ '<span><span>\u00a0</span>of<span>\u00a0</span></span>' +
|
|
|
+ '<strong>CKEditor\u00a05</strong>' +
|
|
|
+ '<span>.</span>'
|
|
|
+ );
|
|
|
+
|
|
|
+ expect( stringify( fragment ) ).to.equal(
|
|
|
+ '<span>This is the<span>\u00a0</span></span>' +
|
|
|
+ '<a href="url">third developer preview</a>' +
|
|
|
+ '<span><span>\u00a0</span>of<span>\u00a0</span></span>' +
|
|
|
+ '<strong>CKEditor\u00a05</strong>' +
|
|
|
+ '<span>.</span>'
|
|
|
+ );
|
|
|
+
|
|
|
+ // Just to be sure... stringify() uses conversion and the browser extensively,
|
|
|
+ // so it's not entirely safe.
|
|
|
+ expect( fragment.getChild( 0 ).getChild( 1 ).getChild( 0 ).data ).to.equal( '\u00a0' );
|
|
|
+ expect( fragment.getChild( 2 ).getChild( 0 ).getChild( 0 ).data ).to.equal( '\u00a0' );
|
|
|
+ expect( fragment.getChild( 2 ).getChild( 2 ).getChild( 0 ).data ).to.equal( '\u00a0' );
|
|
|
+ } );
|
|
|
+ } );
|
|
|
} );
|
|
|
|
|
|
describe( 'toData()', () => {
|