summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-tablerows.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-07-26 20:29:50 +0000
committerKarl Berry <karl@freefriends.org>2021-07-26 20:29:50 +0000
commit6190adeb5ec3b9128a55a4add7f367f18491742b (patch)
treeba33478aa6e56e39fe01b6232cebe59578aff904 /Master/texmf-dist/scripts/make4ht/domfilters/make4ht-tablerows.lua
parente50d32b956ce2adb17364c5fc9eb070ba490a00a (diff)
make4ht (26jul21)
git-svn-id: svn://tug.org/texlive/trunk@60077 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/make4ht/domfilters/make4ht-tablerows.lua')
-rw-r--r--Master/texmf-dist/scripts/make4ht/domfilters/make4ht-tablerows.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-tablerows.lua b/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-tablerows.lua
index 3e3931b368a..ef36a85750a 100644
--- a/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-tablerows.lua
+++ b/Master/texmf-dist/scripts/make4ht/domfilters/make4ht-tablerows.lua
@@ -40,6 +40,12 @@ return function(dom)
-- that matches this pattern, so we should keep the row if we match them too)
return not css:match(search_term)
end
+ local hline_hr = function(row)
+ -- remove <hr> elements from "hline" rows
+ for _, hr in ipairs(row:query_selector(".hline hr")) do
+ hr:remove_node()
+ end
+ end
local load_css_files = function()
-- the empty rows can be styled using CSS, for example configuration for
-- Booktabs does that. We shouldn't remove such rows.
@@ -62,6 +68,7 @@ return function(dom)
-- find the empty rows
for _, row in ipairs(tbl:query_selector("tr")) do
if is_empty_row(row) and is_not_styled(row, css) then row:remove_node() end
+ hline_hr(row)
end
end