From f3b2c12fe4a10ef5d917861758a995ce774a7651 Mon Sep 17 00:00:00 2001 From: Vadim Kiryukhin Date: Thu, 14 Jun 2012 15:06:15 -0700 Subject: [PATCH] xmlns minify issue is fixed. --- main.js | 2 +- vkbeautify.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index fc4abaa..d3f58bd 100644 --- a/main.js +++ b/main.js @@ -90,7 +90,7 @@ function loadTemplate(name) case 'basic': $('#ta').width(400); $('#leftpanel').show(); - document.getElementById('ta').value = 'bbb ]]>'; + document.getElementById('ta').value = 'bbb ]]>'; $('#rightpanel').empty().load('html/basic.html'); $('#mode').html('XML'); countChars(); diff --git a/vkbeautify.js b/vkbeautify.js index 4f43e9e..03187d5 100644 --- a/vkbeautify.js +++ b/vkbeautify.js @@ -356,7 +356,8 @@ vkbeautify.prototype.sql = function(text,step) { vkbeautify.prototype.xmlmin = function(text, preserveComments) { var str = preserveComments ? text - : text.replace(/\/g,""); + : text.replace(/\/g,"") + .replace(/[ \r\n\t]{1,}xmlns/g, ' xmlns'); return str.replace(/>\s{0,}<"); }