Commit 9a640cfe authored by mrodzis's avatar mrodzis 🌎
Browse files

Improve whitespace handling

parent 1c787e51
......@@ -317,6 +317,14 @@ declare function fontaneSimple:transform($nodes as node()*, $uri as xs:string) a
if($node/@type = "highlighted"
and simpleHelpers:is-hand-contemporary($node/@hand)) then
$node
else if($node/following::node()[1][self::text()]) then
let $first-char := $node/following::node()[1][self::text()]
=> substring(1, 1)
return
if(matches($first-char, "[\s]")) then
(fontaneSimple:transform($node/node(), $uri), text{" "})
else
fontaneSimple:transform($node/node(), $uri)
else
fontaneSimple:transform($node/node(), $uri)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment