summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-joincharacters.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts/make4ht/domfilters/make4ht-joincharacters.lua')
-rw-r--r--Master/texmf-dist/scripts/make4ht/domfilters/make4ht-joincharacters.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-joincharacters.lua b/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-joincharacters.lua
index 8116a970da0..99d3058d7dd 100644
--- a/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-joincharacters.lua
+++ b/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-joincharacters.lua
@@ -27,9 +27,9 @@ local function join_characters(obj,par)
return next_el
-- if the next node is space followed by a matching element, we should add this space
elseif next_el and next_el:is_text() and get_next(next_el, class) then
- local text = next_el._text
+ local text = next_el._text
-- match only text containing just whitespace
- if text:match("^%s+$") then return next_el end
+ if text:match("^%s+$") then return next_el end
end
end
-- loop over all elements and test if the current element is in a list of
@@ -51,8 +51,6 @@ local function join_characters(obj,par)
-- add the whitespace
elseif next_el:is_text() then
local s = next_el._text
- -- this is needed to fix newlines inserted by Tidy
- s = s:gsub("\n", "")
-- we must create a new node
el:add_child_node(el:create_text_node(s))
next_el:remove_node()