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

Docs improvements and code refactoring.

Aleksander Nowodzinski 5 лет назад
Родитель
Сommit
57f2e2588e
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      packages/ckeditor5-select-all/src/selectallcommand.js

+ 4 - 2
packages/ckeditor5-select-all/src/selectallcommand.js

@@ -39,6 +39,7 @@ export default class SelectAllCommand extends Command {
 		if ( selection.containsEntireContent( scopeElement ) || !isSelectAllScope( model.schema, scopeElement ) ) {
 			do {
 				scopeElement = scopeElement.parent;
+
 				// Do nothing, if the entire `root` is already selected.
 				if ( !scopeElement ) {
 					return;
@@ -53,9 +54,10 @@ export default class SelectAllCommand extends Command {
 }
 
 // Checks whether the element is a valid select-all scope.
-// Returns true, it the element {@link module:engine/model/schema~Schema#isLimit `isLimit()`},
+// Returns true, if the element is a {@link module:engine/model/schema~Schema#isLimit limit},
 // and can contain any text or paragraph.
-// @param {module:engine/model/schema~Schema} schema The schema to cheng against.
+//
+// @param {module:engine/model/schema~Schema} schema The schema to check against.
 // @param {module:engine/model/element~Element} element
 // @return {Boolean}
 function isSelectAllScope( schema, element ) {