瀏覽代碼

Add sample comment to loop collecting split elements.

Oskar Wróbel 8 年之前
父節點
當前提交
8edc66b13b
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      packages/ckeditor5-engine/src/conversion/viewconversiondispatcher.js

+ 3 - 0
packages/ckeditor5-engine/src/conversion/viewconversiondispatcher.js

@@ -285,6 +285,9 @@ export default class ViewConversionDispatcher {
 
 		// Remember all elements that are created as a result of split.
 		// This is important because at the end of conversion we want to remove all empty split elements.
+		//
+		// Loop through positions between elements in range (except split result position) and collect parents.
+		// <notSplit><split1><split2>[pos]</split2>[pos]</split1>[omit]<split1>[pos]<split2>[pos]</split2></split1></notSplit>
 		for ( const position of splitResult.range.getPositions() ) {
 			if ( !position.isEqual( splitResult.position ) ) {
 				this._splitElements.add( position.parent );