diff options
Diffstat (limited to 'support/make4ht/domfilters/make4ht-odtpartable.lua')
-rw-r--r-- | support/make4ht/domfilters/make4ht-odtpartable.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/support/make4ht/domfilters/make4ht-odtpartable.lua b/support/make4ht/domfilters/make4ht-odtpartable.lua new file mode 100644 index 0000000000..f4e84b55d9 --- /dev/null +++ b/support/make4ht/domfilters/make4ht-odtpartable.lua @@ -0,0 +1,9 @@ +-- find all tables inside paragraphs, replace the found paragraphs with the child table +return function(dom) + for _,table in ipairs(dom:query_selector("text|p table|table")) do + -- replace the paragraph by its child element + local parent = table:get_parent() + parent:replace_node(table) + end + return dom +end |