Ticket #4107: 4107_2.patch

File 4107_2.patch, 1.5 KB (added by Garry Yao, 15 years ago)
  • _tests/dt/plugins/styles/styles.html

     
    427427                        assert.isTrue( style.checkElementRemovable( element, true ) );
    428428                },
    429429
     430                test_checkElementRemovable_fontFamily : function()
     431                {
     432                        var element = CKEDITOR.dom.element.createFromHtml( '<span style="font-family: georgia,  serif">Test Font</span>', doc );
     433
     434                        var style = new CKEDITOR.style( { element : 'span', styles : { 'font-family' : '#(family)' } }, { family : 'Georgia, serif;' } );
     435
     436                        assert.isTrue( style.checkElementRemovable( element, true ) );
     437                },
     438
    430439                test_ticket_3091 : function()
    431440                {
    432441                        var element = doc.getById( '_P1' );
     
    583592                        assert.areSame( '<p>&nbsp;paragraph1&nbsp; paragraph1<br />paragraph2</p><p>&nbsp;para&nbsp;&nbsp; graph3</p>',
    584593                                         result );
    585594                },
     595
     596
    586597                name : document.title
    587598        };
    588599})() );
  • _source/plugins/styles/plugin.js

     
    12001200                // Compensate tail semi-colon.
    12011201                return styleText.replace( /\s*([;:])\s*/, '$1' )
    12021202                                                         .replace( /([^\s;])$/, '$1;')
     1203                                                         .replace( /,\s+/g, ',' ) // Trimming spaces after comma (e.g. font-family name)(#4107).
    12031204                                                         .toLowerCase();
    12041205        }
    12051206
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy