From: Radek Czajka Date: Mon, 5 May 2025 11:02:31 +0000 (+0200) Subject: Remove br magic. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/8f049b683ba43e70018b1bd860f6c082b171ead5?ds=inline;hp=1ee716ea2b876762950786a9d9d2ba2f666530f9 Remove br magic. --- diff --git a/src/redakcja/static/js/wiki/xslt.js b/src/redakcja/static/js/wiki/xslt.js index 99af3c35..922a3ba2 100644 --- a/src/redakcja/static/js/wiki/xslt.js +++ b/src/redakcja/static/js/wiki/xslt.js @@ -36,7 +36,7 @@ function withStylesheets(code_block, onError) function xml2html(options) { withStylesheets(function() { - var xml = options.xml.replace(/\/(\s+)/g, '
$1'); + var xml = options.xml.replace(/\/(\s+)/g, '<_n />$1'); xml = xml.replace(/([^a-zA-Z0-9ąćęłńóśźżĄĆĘŁŃÓŚŹŻ\s<>«»\\*_!,:;?&%."'=#()\/-]+)/g, '$1'); var parser = new DOMParser(); var serializer = new XMLSerializer(); diff --git a/src/wlxml/templates/wlxml/wl2html.xsl b/src/wlxml/templates/wlxml/wl2html.xsl index 9716e19f..c70286a0 100644 --- a/src/wlxml/templates/wlxml/wl2html.xsl +++ b/src/wlxml/templates/wlxml/wl2html.xsl @@ -81,16 +81,16 @@ - - + + - - - + + + + select="following-sibling::node()[count(preceding-sibling::_n) = $lnum+1]" /> @@ -106,7 +106,7 @@ - + @@ -114,17 +114,17 @@ - +
- +
- + @@ -143,7 +143,7 @@
{% endif %} - / + / {% if tags.span %}