JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.3.2
[ckeditor.git] / _source / plugins / pastefromword / filter / default.js
index b042a33..61ceaf8 100644 (file)
@@ -60,15 +60,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                child = child.firstChild( evaluator );\r
                                if ( child )\r
                                        return child;\r
-                               else\r
-                                       continue;\r
                        }\r
                }\r
 \r
                return null;\r
        };\r
 \r
-       // Adding a (set) of styles to the element's attributes.\r
+       // Adding a (set) of styles to the element's 'style' attributes.\r
        elementPrototype.addStyle = function( name, value, isPrepend )\r
        {\r
                var styleText, addingStyleText = '';\r
@@ -121,7 +119,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
        };\r
 \r
        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;\r
-       var emptyMarginRegex = /^(?:\b0[^\s]*\s*){1,4}$/;\r
+       var emptyMarginRegex = /^(?:\b0[^\s]*\s*){1,4}$/;               // e.g. 0px 0pt 0px\r
 \r
        var listBaseIndent = 0,\r
                 previousListItemMargin;\r
@@ -161,11 +159,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                }\r
                                else\r
                                {\r
-                                       if ( /[l\u00B7\u2002]/.test( bulletStyle[ 1 ] ) ) //l·•\r
+                                       if ( /[l\u00B7\u2002]/.test( bulletStyle[ 1 ] ) )\r
                                                bulletStyle = 'disc';\r
-                                       else if ( /[\u006F\u00D8]/.test( bulletStyle[ 1 ] ) )  //oØ\r
+                                       else if ( /[\u006F\u00D8]/.test( bulletStyle[ 1 ] ) )\r
                                                bulletStyle = 'circle';\r
-                                       else if ( /[\u006E\u25C6]/.test( bulletStyle[ 1 ] ) ) //n◆\r
+                                       else if ( /[\u006E\u25C6]/.test( bulletStyle[ 1 ] ) )\r
                                                bulletStyle = 'square';\r
                                        else\r
                                                bulletStyle = 'disc';\r
@@ -200,8 +198,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        resolveList : function( element )\r
                        {\r
                                // <cke:listbullet> indicate a list item.\r
-                               var children = element.children,\r
-                                       attrs = element.attributes,\r
+                               var attrs = element.attributes,\r
                                        listMarker;\r
 \r
                                if ( ( listMarker = element.removeAnyChildWithName( 'cke:listbullet' ) )\r
@@ -589,7 +586,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                stylesFilter = filters.stylesFilter,\r
                                elementMigrateFilter = filters.elementMigrateFilter,\r
                                styleMigrateFilter = CKEDITOR.tools.bind( this.filters.styleMigrateFilter, this.filters ),\r
-                               bogusAttrFilter = filters.bogusAttrFilter,\r
                                createListBulletMarker = this.utils.createListBulletMarker,\r
                                flattenList = filters.flattenList,\r
                                assembleList = filters.assembleList,\r
@@ -756,10 +752,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                        {\r
                                                element.filterChildren();\r
 \r
-                                               var attrs = element.attributes,\r
-                                                       parent = element.parent,\r
-                                                       children = element.children;\r
-\r
                                                // Is the paragraph actually a list item?\r
                                                if ( resolveListItem( element ) )\r
                                                        return;\r
@@ -829,7 +821,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                        element.attributes );\r
                                                        styleText && parent.addStyle( styleText );\r
                                                        delete element.name;\r
-                                                       return;\r
                                                }\r
                                                // Convert the merged into a span with all attributes preserved.\r
                                                else\r