insertText = '',
selTextArr = selText.split( '\n' );
for ( i = 0; i < selTextArr.length; i++ ) {
- insertText += pre + selTextArr[i] + post;
+ insertText += pre + selTextArr[ i ] + post;
if ( i !== selTextArr.length - 1 ) {
insertText += '\n';
}
// Apply defaults
switch ( command ) {
- //case 'getContents': // no params
- //case 'setContents': // no params with defaults
- //case 'getSelection': // no params
+ // case 'getContents': // no params
+ // case 'setContents': // no params with defaults
+ // case 'getSelection': // no params
case 'encapsulateSelection':
options = $.extend( {
pre: '', // Text to insert before the cursor/selection
context.fn.restoreSelection();
needSave = true;
}
- retval = ( alternateFn && alternateFn[command] || fn[command] ).call( this, options );
+ retval = ( alternateFn && alternateFn[ command ] || fn[ command ] ).call( this, options );
if ( hasWikiEditor && needSave ) {
context.fn.saveSelection();
}