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

Apply suggestions from code review

Co-Authored-By: Maciej <jodator@jodator.net>
Mateusz Samsel 6 лет назад
Родитель
Сommit
0b067a2e24

+ 1 - 1
packages/ckeditor5-paste-from-office/src/normalizer/googledocsnormalizer.js

@@ -11,7 +11,7 @@ import { removeBoldTagWrapper } from '../filters/common';
 import UpcastWriter from '@ckeditor/ckeditor5-engine/src/view/upcastwriter';
 
 /**
- * Normalizer fixing HTML syntax obtained from Google Docs.
+ * Normalizer for the content pasted from Google Docs.
  *
  * @implements module:paste-from-office/normalizer~Normalizer
  */

+ 1 - 1
packages/ckeditor5-paste-from-office/src/normalizer/mswordnormalizer.js

@@ -12,7 +12,7 @@ import { transformListItemLikeElementsIntoLists } from '../filters/list';
 import { replaceImagesSourceWithBase64 } from '../filters/image';
 
 /**
- * Normalizer fixing HTML syntax obtained from Microsoft Word documents.
+ * Normalizer for the content pasted from Microsoft Word.
  *
  * @implements module:paste-from-office/normalizer~Normalizer
  */

+ 3 - 3
packages/ckeditor5-paste-from-office/src/pastefromoffice.js

@@ -19,9 +19,9 @@ import Clipboard from '@ckeditor/ckeditor5-clipboard/src/clipboard';
  * This plugin handles content pasted from Office apps and transforms it (if necessary)
  * to a valid structure which can then be understood by the editor features.
  *
- * Transformation is made by a set of predefined {@link module:paste-from-office/normalizer~Normalizer}.
- * Currently, there are included followed normalizers:
- *   * {@link module:paste-from-office/normalizer/mswordnormalizer~MSWordNormalizer MS Word normalizer}
+ * Transformation is made by a set of predefined {@link module:paste-from-office/normalizer~Normalizer normalizers}.
+ * This plugin includes following normalizers:
+ *   * {@link module:paste-from-office/normalizer/mswordnormalizer~MSWordNormalizer Microsoft Word normalizer}
  *   * {@link module:paste-from-office/normalizer/googledocsnormalizer~GoogleDocsNormalizer Google Docs normalizer}
  *
  * For more information about this feature check the {@glink api/paste-from-office package page}.

+ 1 - 1
packages/ckeditor5-paste-from-office/tests/data/integration.js

@@ -22,7 +22,7 @@ import { generateTests } from '../_utils/utils';
 
 const browsers = [ 'chrome', 'firefox', 'safari', 'edge' ];
 
-describe( 'PasteFromOffice/data - automatic', () => {
+describe( 'PasteFromOffice - integration', () => {
 	generateTests( {
 		input: 'basic-styles',
 		type: 'integration',

+ 1 - 1
packages/ckeditor5-paste-from-office/tests/data/normalization.js

@@ -14,7 +14,7 @@ const editorConfig = {
 	plugins: [ Clipboard, PasteFromOffice ]
 };
 
-describe( 'PasteFromOffice/data - automatic', () => {
+describe( 'PasteFromOffice - normalization', () => {
 	generateTests( {
 		input: 'basic-styles',
 		type: 'normalization',

+ 1 - 1
packages/ckeditor5-paste-from-office/tests/filters/common.js

@@ -7,7 +7,7 @@ import HtmlDataProcessor from '@ckeditor/ckeditor5-engine/src/dataprocessor/html
 import { removeBoldTagWrapper } from '../../src/filters/common';
 import UpcastWriter from '@ckeditor/ckeditor5-engine/src/view/upcastwriter';
 
-describe( 'PasteFromOffice/filters', () => {
+describe( 'PasteFromOffice - filters', () => {
 	const htmlDataProcessor = new HtmlDataProcessor();
 	describe( 'common', () => {
 		describe( 'removeBoldTagWrapper', () => {

+ 1 - 1
packages/ckeditor5-paste-from-office/tests/filters/image.js

@@ -12,7 +12,7 @@ import { parseHtml } from '../../src/filters/parse';
 import { replaceImagesSourceWithBase64, _convertHexToBase64 } from '../../src/filters/image';
 import { browserFixtures } from '../_data/image/index';
 
-describe( 'PasteFromOffice/filters', () => {
+describe( 'PasteFromOffice - filters', () => {
 	describe( 'image', () => {
 		let editor;
 

+ 1 - 1
packages/ckeditor5-paste-from-office/tests/filters/list.js

@@ -9,7 +9,7 @@ import View from '@ckeditor/ckeditor5-engine/src/view/view';
 
 import { transformListItemLikeElementsIntoLists } from '../../src/filters/list';
 
-describe( 'PasteFromOffice/filters', () => {
+describe( 'PasteFromOffice - filters', () => {
 	describe( 'list', () => {
 		const htmlDataProcessor = new HtmlDataProcessor();
 

+ 1 - 1
packages/ckeditor5-paste-from-office/tests/filters/parse.js

@@ -9,7 +9,7 @@ import DocumentFragment from '@ckeditor/ckeditor5-engine/src/view/documentfragme
 
 import { parseHtml } from '../../src/filters/parse';
 
-describe( 'PasteFromOffice/filters', () => {
+describe( 'PasteFromOffice - filters', () => {
 	describe( 'parse', () => {
 		describe( 'parseHtml()', () => {
 			it( 'correctly parses HTML with body and one style tag', () => {

+ 1 - 1
packages/ckeditor5-paste-from-office/tests/filters/space.js

@@ -7,7 +7,7 @@
 
 import { normalizeSpacing, normalizeSpacerunSpans } from '../../src/filters/space';
 
-describe( 'PasteFromOffice/filters', () => {
+describe( 'PasteFromOffice - filters', () => {
 	describe( 'space', () => {
 		describe( 'normalizeSpacing()', () => {
 			it( 'should replace last space before closing tag with NBSP', () => {

+ 1 - 1
packages/ckeditor5-paste-from-office/tests/normalizer/googledocsnormalizer.js

@@ -6,7 +6,7 @@
 import GoogleDocsNormalizer from '../../src/normalizer/googledocsnormalizer';
 
 // exec() of the google docs normalizer is tested with autogenerated normalization tests.
-describe( 'PasteFromOffice/normalizer/googledocsnormalizer', () => {
+describe( 'GoogleDocsNormalizer', () => {
 	const normalizer = new GoogleDocsNormalizer();
 
 	describe( 'isActive()', () => {

+ 1 - 1
packages/ckeditor5-paste-from-office/tests/normalizer/mswordnormalizer.js

@@ -6,7 +6,7 @@
 import MSWordNormalizer from '../../src/normalizer/mswordnormalizer';
 
 // `exec()` of the msword normalizer is tested with autogenerated normalization tests.
-describe( 'PasteFromOffice/normalizer/mswornormalizer', () => {
+describe( 'MSWordNormalizer', () => {
 	const normalizer = new MSWordNormalizer();
 
 	describe( 'isActive()', () => {

+ 2 - 2
packages/ckeditor5-paste-from-office/tests/pastefromoffice.js

@@ -26,11 +26,11 @@ describe( 'PasteFromOffice', () => {
 			} );
 	} );
 
-	it( 'is Paste from Office', () => {
+	it( 'should be loaded', () => {
 		expect( pasteFromOffice ).to.be.instanceOf( PasteFromOffice );
 	} );
 
-	it( 'should have static name', () => {
+	it( 'has proper name', () => {
 		expect( PasteFromOffice.pluginName ).to.equal( 'PasteFromOffice' );
 	} );