From 8f049b683ba43e70018b1bd860f6c082b171ead5 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 5 May 2025 13:02:31 +0200 Subject: [PATCH 1/1] Remove br magic. --- src/redakcja/static/js/wiki/xslt.js | 2 +- src/wlxml/templates/wlxml/wl2html.xsl | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) 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 %} -- 2.20.1