Bläddra i källkod

Refactoring: there's no sense to use underscore for scoped methods.

Piotrek Koszuliński 9 år sedan
förälder
incheckning
b7a8cf83d6
1 ändrade filer med 5 tillägg och 5 borttagningar
  1. 5 5
      packages/ckeditor5-engine/src/model/liveselection.js

+ 5 - 5
packages/ckeditor5-engine/src/model/liveselection.js

@@ -511,11 +511,11 @@ export default class LiveSelection extends Selection {
 			const nodeAfter = position.textNode ? position.textNode : position.nodeAfter;
 			const nodeAfter = position.textNode ? position.textNode : position.nodeAfter;
 
 
 			// ...look at the node before caret and take attributes from it if it is a character node.
 			// ...look at the node before caret and take attributes from it if it is a character node.
-			attrs = _getAttrsIfCharacter( nodeBefore );
+			attrs = getAttrsIfCharacter( nodeBefore );
 
 
 			// 3. If not, look at the node after caret...
 			// 3. If not, look at the node after caret...
 			if ( !attrs ) {
 			if ( !attrs ) {
-				attrs = _getAttrsIfCharacter( nodeAfter );
+				attrs = getAttrsIfCharacter( nodeAfter );
 			}
 			}
 
 
 			// 4. If not, try to find the first character on the left, that is in the same node.
 			// 4. If not, try to find the first character on the left, that is in the same node.
@@ -524,7 +524,7 @@ export default class LiveSelection extends Selection {
 
 
 				while ( node && !attrs ) {
 				while ( node && !attrs ) {
 					node = node.previousSibling;
 					node = node.previousSibling;
-					attrs = _getAttrsIfCharacter( node );
+					attrs = getAttrsIfCharacter( node );
 				}
 				}
 			}
 			}
 
 
@@ -534,7 +534,7 @@ export default class LiveSelection extends Selection {
 
 
 				while ( node && !attrs ) {
 				while ( node && !attrs ) {
 					node = node.nextSibling;
 					node = node.nextSibling;
-					attrs = _getAttrsIfCharacter( node );
+					attrs = getAttrsIfCharacter( node );
 				}
 				}
 			}
 			}
 
 
@@ -553,7 +553,7 @@ export default class LiveSelection extends Selection {
 //
 //
 // @param {engine.model.Item}  node
 // @param {engine.model.Item}  node
 // @returns {Boolean}
 // @returns {Boolean}
-function _getAttrsIfCharacter( node ) {
+function getAttrsIfCharacter( node ) {
 	if ( node instanceof TextProxy || node instanceof Text ) {
 	if ( node instanceof TextProxy || node instanceof Text ) {
 		return node.getAttributes();
 		return node.getAttributes();
 	}
 	}