X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/0f406b246f9261651b5982be71a49189349c8e3e..80c653023eaa918f6b736e84d12e17d3c9c24d88:/modules/documentCanvas/tests/utils.js diff --git a/modules/documentCanvas/tests/utils.js b/modules/documentCanvas/tests/utils.js deleted file mode 100644 index e23808c..0000000 --- a/modules/documentCanvas/tests/utils.js +++ /dev/null @@ -1,29 +0,0 @@ -define(['libs/jquery-1.9.1.min'], function($) { - 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 $('
').append(xml).html(); - } - } -}); \ No newline at end of file