Skip to content
Snippets Groups Projects
Commit 67d740af authored by usikora's avatar usikora :monkey:
Browse files

identifies single whitespace between nodes and escapes it

parent 78909b08
No related branches found
No related tags found
No related merge requests found
......@@ -32,9 +32,9 @@ declare function whitespace:text
let $normalized := normalize-space($text)
let $single-whitespace-between-nodes := $text
[ self::node() = ' ']
[preceding-sibling::node()[not(self::node() = text())]]
[following-sibling::node()[not(self::node() = text())]]
return
(: [preceding-sibling::node()[not(self::node() = text())]]:)
(: [following-sibling::node()[not(self::node() = text())]]:)
return
if ( $normalized != "" or $single-whitespace-between-nodes) then (
if ($escape-char) then (
......@@ -43,6 +43,7 @@ declare function whitespace:text
)
else ()
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment