Browse Source

Apply suggestions from code review

Co-Authored-By: Maciej <jodator@gmail.com>
Mateusz Samsel 6 years ago
parent
commit
b1d5c269ff

+ 5 - 5
packages/ckeditor5-word-count/src/wordcount.js

@@ -308,9 +308,9 @@ export default class WordCount extends Plugin {
  */
 
 /**
- * This configuration takes a function, which is executed whenever the word-count plugin update its values.
- * Function is called with one argument, which is object with `words` and `characters` keys containing
- * an amount of detected words and characters in the document.
+ * This configuration takes a function, which is executed whenever the word-count plugin updates its values.
+ * This function is called with one argument, which is an object with `words` and `characters` keys containing
+ * a number of detected words and characters in the document.
  *
  *		const wordCountConfig = {
  *			onUpdate: function( values ) {
@@ -324,11 +324,11 @@ export default class WordCount extends Plugin {
 
 /**
  * This option allows on providing an HTML element where
- * {@link module:wordcount/wordcount~WordCount#getWordCountContainer word count container} will be append autoamtically.
+ * {@link module:wordcount/wordcount~WordCount#getWordCountContainer word count container} will be appended automatically.
  *
  *		const wordCountConfig = {
  *			container: document.getElementById( 'container-for-word-count' );
  *		}
  *
- * @member {Function} module:wordcount/wordcount~WordCountConfig#container
+ * @member {HTMLElement} module:wordcount/wordcount~WordCountConfig#container
  */

+ 1 - 1
packages/ckeditor5-word-count/tests/utils.js

@@ -97,7 +97,7 @@ describe( 'utils', () => {
 				expect( modelElementToPlainText( model.document.getRoot() ) ).to.equal( 'FooBar' );
 			} );
 
-			it( 'extracts plain text from mixing structure', () => {
+			it( 'extracts plain text from mixed structure', () => {
 				setModelData( model, '<paragraph>' +
 						'<$text bold="true">111</$text><$text href="url" bold="true">222</$text>333' +
 					'</paragraph><blockQuote>' +

+ 1 - 1
packages/ckeditor5-word-count/tests/wordcount.js

@@ -260,7 +260,7 @@ describe( 'WordCount', () => {
 				.catch( done );
 		} );
 
-		it( 'should call function register under config.wordCount.onUpdate', () => {
+		it( 'should call function registered under config.wordCount.onUpdate', () => {
 			const fake = sinon.fake();
 			return VirtualTestEditor.create( {
 				plugins: [ WordCount, Paragraph ],