X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/28cd732838488b94daa3ff66dbb8a22a11de459e..298031e8a452a9012bc43098a32f60f5b5a2b152:/redakcja/static/js/wiki/xslt.js?ds=sidebyside diff --git a/redakcja/static/js/wiki/xslt.js b/redakcja/static/js/wiki/xslt.js index 791cf1a3..67216eb9 100644 --- a/redakcja/static/js/wiki/xslt.js +++ b/redakcja/static/js/wiki/xslt.js @@ -58,7 +58,6 @@ function withThemes(code_block, onError) } - function xml2html(options) { withStylesheets(function() { var xml = options.xml.replace(/\/(\s+)/g, '
$1'); @@ -80,7 +79,10 @@ function xml2html(options) { } if (error.length > 0 && options.error) { - options.error(error.text()); + source = $('sourcetext', doc); + source_text = source.text(); + source.text(''); + options.error(error.text(), source_text); } else { options.success(doc.firstChild); @@ -271,7 +273,7 @@ HTMLSerializer.prototype.serialize = function(rootElement, stripOuter) if(xnode === 'wers') { /* push children */ if(self._verseBefore(token.node)) - self.result += '/'; + self.result += '/\n'; self._pushChildren(token.node); break; };