X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/4a10da821d96b8e462cc9db5e74e2507445eee76..02a91f42fa120c3f1d5f08100cf0f85bc571b5d1:/modules/documentCanvas/tests/utils.js?ds=sidebyside diff --git a/modules/documentCanvas/tests/utils.js b/modules/documentCanvas/tests/utils.js index 93d4c03..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 $('