diff options
author | Norbert Preining <norbert@preining.info> | 2021-03-20 03:01:11 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-03-20 03:01:11 +0000 |
commit | d3b06b2254431c03e127876a07ae654091314c72 (patch) | |
tree | 4fa5e40c55aae3ceeeab0048fabbb778ee06e284 /support/make4ht/formats/make4ht-odt.lua | |
parent | 6ad1cf68ae6add67e56faf5ec4390fead04e31b4 (diff) |
CTAN sync 202103200301
Diffstat (limited to 'support/make4ht/formats/make4ht-odt.lua')
-rw-r--r-- | support/make4ht/formats/make4ht-odt.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/support/make4ht/formats/make4ht-odt.lua b/support/make4ht/formats/make4ht-odt.lua index 30fdc0744d..4d5d768ee7 100644 --- a/support/make4ht/formats/make4ht-odt.lua +++ b/support/make4ht/formats/make4ht-odt.lua @@ -128,6 +128,13 @@ local function exec_group(groups, name, fn) end end +-- remove <?xtpipes XML instructions, because they cause issues in some ODT processing +-- applications +local function remove_xtpipes(text) + -- remove <?x + return text:gsub("%<%?xtpipes.-%?%>", "") +end + function M.modify_build(make) local executed = false -- execute xtpipes from the build file, instead of t4ht. this fixes issues with wrong paths @@ -142,7 +149,7 @@ function M.modify_build(make) -- execute it before xtpipes, because we don't want xtpipes to mess with t4htlink elements move_matches(make) -- convert XML entities for Unicode characters produced by Xtpipes to characters - local fixentities = filter {"entities-to-unicode"} + local fixentities = filter {"entities-to-unicode", remove_xtpipes} make:match("4oo", fixentities) make:match("4om", fixentities) |