X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fpastefromword%2Ffilter%2Fdefault.js;h=61ceaf8e2906488c2e4647e39f6fb7b6c99829ea;hb=055b6b0792ce7dc53d47af606b367c04b927c2ab;hp=b042a33cedc03fe466d8e21513856b6ef950fbbd;hpb=c6e377a02b54abc07129d72b632763c727476a15;p=ckeditor.git diff --git a/_source/plugins/pastefromword/filter/default.js b/_source/plugins/pastefromword/filter/default.js index b042a33..61ceaf8 100644 --- a/_source/plugins/pastefromword/filter/default.js +++ b/_source/plugins/pastefromword/filter/default.js @@ -60,15 +60,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license child = child.firstChild( evaluator ); if ( child ) return child; - else - continue; } } return null; }; - // Adding a (set) of styles to the element's attributes. + // Adding a (set) of styles to the element's 'style' attributes. elementPrototype.addStyle = function( name, value, isPrepend ) { var styleText, addingStyleText = ''; @@ -121,7 +119,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license }; var cssLengthRelativeUnit = /^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz){1}?/i; - var emptyMarginRegex = /^(?:\b0[^\s]*\s*){1,4}$/; + var emptyMarginRegex = /^(?:\b0[^\s]*\s*){1,4}$/; // e.g. 0px 0pt 0px var listBaseIndent = 0, previousListItemMargin; @@ -161,11 +159,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license } else { - if ( /[l\u00B7\u2002]/.test( bulletStyle[ 1 ] ) ) //l·• + if ( /[l\u00B7\u2002]/.test( bulletStyle[ 1 ] ) ) bulletStyle = 'disc'; - else if ( /[\u006F\u00D8]/.test( bulletStyle[ 1 ] ) ) //oØ + else if ( /[\u006F\u00D8]/.test( bulletStyle[ 1 ] ) ) bulletStyle = 'circle'; - else if ( /[\u006E\u25C6]/.test( bulletStyle[ 1 ] ) ) //n◆ + else if ( /[\u006E\u25C6]/.test( bulletStyle[ 1 ] ) ) bulletStyle = 'square'; else bulletStyle = 'disc'; @@ -200,8 +198,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license resolveList : function( element ) { // indicate a list item. - var children = element.children, - attrs = element.attributes, + var attrs = element.attributes, listMarker; if ( ( listMarker = element.removeAnyChildWithName( 'cke:listbullet' ) ) @@ -589,7 +586,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license stylesFilter = filters.stylesFilter, elementMigrateFilter = filters.elementMigrateFilter, styleMigrateFilter = CKEDITOR.tools.bind( this.filters.styleMigrateFilter, this.filters ), - bogusAttrFilter = filters.bogusAttrFilter, createListBulletMarker = this.utils.createListBulletMarker, flattenList = filters.flattenList, assembleList = filters.assembleList, @@ -756,10 +752,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { element.filterChildren(); - var attrs = element.attributes, - parent = element.parent, - children = element.children; - // Is the paragraph actually a list item? if ( resolveListItem( element ) ) return; @@ -829,7 +821,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license element.attributes ); styleText && parent.addStyle( styleText ); delete element.name; - return; } // Convert the merged into a span with all attributes preserved. else