diff options
author | Norbert Preining <norbert@preining.info> | 2021-07-27 03:01:57 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-07-27 03:01:57 +0000 |
commit | cef58753eba8ad7e2071195dbd92454febe82d32 (patch) | |
tree | df909696e42fb25ce108e30258c7f935ded86079 /support/make4ht/domfilters/make4ht-tablerows.lua | |
parent | 84465d50d746dfed1bfbe7bb5065279665fa87de (diff) |
CTAN sync 202107270301
Diffstat (limited to 'support/make4ht/domfilters/make4ht-tablerows.lua')
-rw-r--r-- | support/make4ht/domfilters/make4ht-tablerows.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/support/make4ht/domfilters/make4ht-tablerows.lua b/support/make4ht/domfilters/make4ht-tablerows.lua index 3e3931b368..ef36a85750 100644 --- a/support/make4ht/domfilters/make4ht-tablerows.lua +++ b/support/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 |