8
0
Просмотр исходного кода

Merge pull request #325 from ckeditor/i/6091

Internal: Adjusted the code to changes required for replacing the `StylesProcessor` singleton with an instance of the class. See ckeditor/ckeditor5#6091.
Piotrek Koszuliński 5 лет назад
Родитель
Сommit
063a60530e
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      packages/ckeditor5-utils/tests/_utils/normalizehtml.js

+ 3 - 1
packages/ckeditor5-utils/tests/_utils/normalizehtml.js

@@ -5,6 +5,8 @@
 
 import HtmlDataProcessor from '@ckeditor/ckeditor5-engine/src/dataprocessor/htmldataprocessor';
 import { stringify } from '@ckeditor/ckeditor5-engine/src/dev-utils/view';
+import { StylesProcessor } from '@ckeditor/ckeditor5-engine/src/view/stylesmap';
+import Document from '@ckeditor/ckeditor5-engine/src/view/document';
 
 /**
  * Parses given string of HTML and returns normalized HTML.
@@ -13,7 +15,7 @@ import { stringify } from '@ckeditor/ckeditor5-engine/src/dev-utils/view';
  * @returns {String} Normalized HTML string.
  */
 export default function normalizeHtml( html ) {
-	const processor = new HtmlDataProcessor();
+	const processor = new HtmlDataProcessor( new Document( new StylesProcessor() ) );
 	const parsed = processor.toView( html );
 
 	return stringify( parsed );