X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/c986f6ebfd3d20bdc75ce00ee09bd2c716e0cb16..9c5db1c241bd7d0ff38354790dd9fbd43549cd4d:/modules/documentCanvas/tests/utils.js?ds=sidebyside diff --git a/modules/documentCanvas/tests/utils.js b/modules/documentCanvas/tests/utils.js index cf1f7c2..fcb9853 100644 --- a/modules/documentCanvas/tests/utils.js +++ b/modules/documentCanvas/tests/utils.js @@ -1,49 +1,49 @@ -define(['libs/jquery-1.9.1.min', 'libs/chai'], function($, chai) { - return { - cleanUp: function(xml) { - var rmws = function(node) { - if(node.nodeType === 3) { - node.data = $.trim(node.data); - } - else { - $(node).contents().each(function() { - rmws(this); - }); - } - } - - xml = $($.trim(xml)); - xml.each(function() { - rmws(this); - }); - - /*var toret = xml - .replace(/(<.*>)\s*(<.*>)/gm, '$1$2') - .replace(/(<\/.*>)\s*(<\/.*>)/gm, '$1$2') - .replace(/(<\/.*>)\s*(<.*>)/gm, '$1$2'); - return $.trim(toret);*/ - return $('