Another set of missing semicolons
[fnpeditor.git] / modules / documentCanvas / transformations.js
index 4824849..79c28b6 100644 (file)
@@ -26,19 +26,19 @@ define(['libs/jquery-1.9.1.min'], function($) {
                         for(var i = 0; i < this.attributes.length; i++) {\r
                             var attr = this.attributes.item(i);\r
                             var value = attr.name === 'class' ? attr.value.replace(/\./g, '-') : attr.value;\r
                         for(var i = 0; i < this.attributes.length; i++) {\r
                             var attr = this.attributes.item(i);\r
                             var value = attr.name === 'class' ? attr.value.replace(/\./g, '-') : attr.value;\r
-                            toret.attr('wlxml-' + attr.name, value)\r
+                            toret.attr('wlxml-' + attr.name, value);\r
                         }\r
                         toret.append(currentTag.contents());\r
                         return toret;\r
                     });\r
                 });\r
                         }\r
                         toret.append(currentTag.contents());\r
                         return toret;\r
                     });\r
                 });\r
-            }\r
+            };\r
             \r
             transform(toBlock, 'div');\r
             transform(toInline, 'span');\r
 \r
             toret.find(":not(iframe)").addBack().contents().filter(function() {\r
             \r
             transform(toBlock, 'div');\r
             transform(toInline, 'span');\r
 \r
             toret.find(":not(iframe)").addBack().contents().filter(function() {\r
-                return this.nodeType == 3} ).each(function() {\r
+                return this.nodeType == 3;} ).each(function() {\r
                     var n = $(this); \r
                     var hasText = /\S/g.test(n.text());\r
                     if(!hasText) {\r
                     var n = $(this); \r
                     var hasText = /\S/g.test(n.text());\r
                     if(!hasText) {\r
@@ -58,21 +58,21 @@ define(['libs/jquery-1.9.1.min'], function($) {
             $(xml).find('metadata').children().each(function() {\r
                 var node = $(this);\r
                 toret[this.nodeName.split(':')[1].toLowerCase()] = node.text();\r
             $(xml).find('metadata').children().each(function() {\r
                 var node = $(this);\r
                 toret[this.nodeName.split(':')[1].toLowerCase()] = node.text();\r
-            })\r
+            });\r
             return toret;\r
         },\r
         getDocumentDescription: function(xml) {\r
             return {\r
                 HTMLTree: this.getHTMLTree(xml),\r
                 metadata: this.getMetaData(xml)\r
             return toret;\r
         },\r
         getDocumentDescription: function(xml) {\r
             return {\r
                 HTMLTree: this.getHTMLTree(xml),\r
                 metadata: this.getMetaData(xml)\r
-            }\r
+            };\r
         }\r
         }\r
-    }\r
+    };\r
 \r
     transformations.toXML = {\r
         getXML: function(body) {\r
             \r
 \r
     transformations.toXML = {\r
         getXML: function(body) {\r
             \r
-            var inner = $(body);\r
+            var inner = body.clone();\r
             var toret = $('<div></div>');\r
             toret.append(inner);\r
             \r
             var toret = $('<div></div>');\r
             toret.append(inner);\r
             \r
@@ -83,7 +83,7 @@ define(['libs/jquery-1.9.1.min'], function($) {
                                    \r
                 for(var i = 0; i < this.attributes.length; i++) {\r
                     var attr = this.attributes.item(i);\r
                                    \r
                 for(var i = 0; i < this.attributes.length; i++) {\r
                     var attr = this.attributes.item(i);\r
-                    var split = attr.name.split('-')\r
+                    var split = attr.name.split('-');\r
                     console.log(split);\r
                     if(split[0] !== 'wlxml' || (split.length > 1 && split[1] === 'tag')) \r
                         continue;\r
                     console.log(split);\r
                     if(split[0] !== 'wlxml' || (split.length > 1 && split[1] === 'tag')) \r
                         continue;\r
@@ -100,7 +100,7 @@ define(['libs/jquery-1.9.1.min'], function($) {
 \r
             return vkbeautify.xml(toret.html());\r
         }\r
 \r
             return vkbeautify.xml(toret.html());\r
         }\r
-    }\r
+    };\r
 \r
     return transformations;\r
 \r
 \r
     return transformations;\r
 \r