0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2025-01-03 05:00:13 -05:00

Fix whitespace errors.

Thanks to @gertsonderby who pointed these out in #138.
This commit is contained in:
Neil Jenkins 2015-09-28 15:48:23 +02:00
parent 0ec3c43791
commit 9461368a5c
3 changed files with 12 additions and 12 deletions

View file

@ -698,7 +698,7 @@ var insertNodeInRange = function ( range, node ) {
childCount = children.length;
if ( startOffset === childCount) {
if ( startOffset === childCount ) {
startContainer.appendChild( node );
} else {
startContainer.insertBefore( node, children[ startOffset ] );
@ -2734,7 +2734,7 @@ proto._recordUndoState = function ( range ) {
undoStack = this._undoStack;
// Truncate stack if longer (i.e. if has been previously undone)
if ( undoIndex < this._undoStackLength) {
if ( undoIndex < this._undoStackLength ) {
undoStack.length = this._undoStackLength = undoIndex;
}
@ -2898,9 +2898,9 @@ proto._addFormat = function ( tag, attributes, range ) {
SHOW_TEXT|SHOW_ELEMENT,
function ( node ) {
return ( node.nodeType === TEXT_NODE ||
node.nodeName === 'BR'||
node.nodeName === 'IMG' ) &&
isNodeContainedInRange( range, node, true );
node.nodeName === 'BR' ||
node.nodeName === 'IMG'
) && isNodeContainedInRange( range, node, true );
},
false
);

View file

@ -610,7 +610,7 @@ proto._recordUndoState = function ( range ) {
undoStack = this._undoStack;
// Truncate stack if longer (i.e. if has been previously undone)
if ( undoIndex < this._undoStackLength) {
if ( undoIndex < this._undoStackLength ) {
undoStack.length = this._undoStackLength = undoIndex;
}
@ -774,9 +774,9 @@ proto._addFormat = function ( tag, attributes, range ) {
SHOW_TEXT|SHOW_ELEMENT,
function ( node ) {
return ( node.nodeType === TEXT_NODE ||
node.nodeName === 'BR'||
node.nodeName === 'IMG' ) &&
isNodeContainedInRange( range, node, true );
node.nodeName === 'BR' ||
node.nodeName === 'IMG'
) && isNodeContainedInRange( range, node, true );
},
false
);

View file

@ -66,7 +66,7 @@ var insertNodeInRange = function ( range, node ) {
childCount = children.length;
if ( startOffset === childCount) {
if ( startOffset === childCount ) {
startContainer.appendChild( node );
} else {
startContainer.insertBefore( node, children[ startOffset ] );