Ticket #3977: 3977_2.patch
File 3977_2.patch, 1.5 KB (added by , 15 years ago) |
---|
-
_source/plugins/styles/plugin.js
801 801 if ( match.length == 1 ) // one space, preserve it 802 802 return ' ' ; 803 803 else if ( offset == 0 ) // beginning of block 804 return CKEDITOR.tools.rep lace( ' ', match.length - 1 ) + ' ';804 return CKEDITOR.tools.repeat( ' ', match.length - 1 ) + ' '; 805 805 else // end of block 806 return ' ' + CKEDITOR.tools.rep lace( ' ', match.length - 1 );806 return ' ' + CKEDITOR.tools.repeat( ' ', match.length - 1 ); 807 807 } ) ; 808 808 809 809 // 3. Convert \n to <BR>. … … 812 812 blockHtml = blockHtml.replace( /[ \t]{2,}/g, 813 813 function ( match ) 814 814 { 815 return CKEDITOR.tools.rep lace( ' ', match.length - 1 ) + ' ' ;815 return CKEDITOR.tools.repeat( ' ', match.length - 1 ) + ' ' ; 816 816 } ) ; 817 817 818 818 var newBlockClone = newBlock.clone()Index: _source/tests/core/tools.html -
_source/tests/core/tools.html
154 154 assert.areSame( 'silver', clone.cars.Porsche.color ); 155 155 }, 156 156 157 test_ multiple : function()157 test_replace : function() 158 158 { 159 159 assert.areSame( ' ', CKEDITOR.tools.replace( ' ', 3 ) ); 160 160 },