X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/ce89530aa0db752e169adb914938d7f5f9f0ed5a..f1aa11d3c90925a0ecc4f7db2df571aabf99fc3e:/platforma/static/js/xslt.js diff --git a/platforma/static/js/xslt.js b/platforma/static/js/xslt.js index 95cc5fc5..c3f13d6a 100644 --- a/platforma/static/js/xslt.js +++ b/platforma/static/js/xslt.js @@ -50,11 +50,7 @@ function serialize(element, mode) { } if (element.nodeType == 3) { // tekst - if (mode == 'block') { - return [$.trim(element.nodeValue)]; - } else { - return [element.nodeValue]; - } + return [element.nodeValue]; } else if (element.nodeType != 1) { // pomijamy węzły nie będące elementami XML ani tekstem return []; } @@ -62,6 +58,8 @@ function serialize(element, mode) { var result = []; var hasContent = false; + + if (MARGIN[element.tagName]) { for (var i=0; i < MARGIN[element.tagName]; i++) { result.push('\n');