浏览代码

Changed manual test description. Fixed comments.

Szymon Kupś 9 年之前
父节点
当前提交
6abb2218d2
共有 2 个文件被更改,包括 12 次插入12 次删除
  1. 11 12
      packages/ckeditor5-heading/src/formatscommand.js
  2. 1 0
      packages/ckeditor5-heading/tests/manual/formats.md

+ 11 - 12
packages/ckeditor5-heading/src/formatscommand.js

@@ -121,23 +121,22 @@ export default class FormatsCommand extends Command {
 	}
 }
 
-/**
- * Looks for topmost element from position parent to element placed in root.
- *
- * NOTE: This method does not checks schema directly - assumes that only block elements can be placed directly inside
- * root.
- *
- * @param {engine.model.Position} position
- * @param {Boolean} [nodeAfter=true] When position is placed inside root element this will determine if element before
- * or after given position will be returned.
- * @returns {engine.model.Element}
- */
+// Looks for topmost element from position parent to element placed in root.
+//
+// NOTE: This method does not checks schema directly - assumes that only block elements can be placed directly inside
+// root.
+//
+// @private
+// @param {engine.model.Position} position
+// @param {Boolean} [nodeAfter=true] When position is placed inside root element this will determine if element before
+// or after given position will be returned.
+// @returns {engine.model.Element}
 function findTopmostBlock( position, nodeAfter = true ) {
 	let parent = position.parent;
 
 	// If position is placed inside root - get element after/before it.
 	if ( parent instanceof RootElement ) {
-		return nodeAfter ? position.nodeAfter : position.nodeBefore ;
+		return nodeAfter ? position.nodeAfter : position.nodeBefore;
 	}
 
 	while ( !( parent.parent instanceof RootElement ) ) {

+ 1 - 0
packages/ckeditor5-heading/tests/manual/formats.md

@@ -6,4 +6,5 @@
 2. Put selection inside each block and check if dropdown label is changing properly.
 3. Play with formatting:
 	- Switch formats using dropdown.
+	- Apply same format twice to same block to see if its switching with paragraph.
 	- Put selection that spans across multiple blocks and switch formats.