blob: 7c9a2dfaea4aa29c17d18626cb1867e4ee11bac9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
local M = {}
local filter = require "make4ht-domfilter"
-- local process = filter {"fixinlines", "idcolons", "joincharacters" }
-- filters support only html formats
function M.test(format)
if format == "odt" then return false end
return true
end
function M.modify_build(make)
local process = filter {"fixinlines", "idcolons", "joincharacters"}
make:match("html$", process)
local matches = make.matches
-- the filters should be first match to be executed, especially if tidy
-- should be executed as well
if #matches > 1 then
local last = matches[#matches]
table.insert(matches, 1, last)
matches[#matches] = nil
end
return make
end
return M
|