summaryrefslogtreecommitdiff
path: root/support/make4ht/extensions
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-02-19 03:02:56 +0000
committerNorbert Preining <norbert@preining.info>2022-02-19 03:02:56 +0000
commit1db3acf2bbb07034aafc552f322633a96b748cf4 (patch)
tree01227822acc2f3b2641e108b814d38c64031ff4e /support/make4ht/extensions
parent41041c6bdcedcc33698491c2caec4cd725a4fe97 (diff)
CTAN sync 202202190302
Diffstat (limited to 'support/make4ht/extensions')
-rw-r--r--support/make4ht/extensions/make4ht-ext-common_domfilters.lua4
-rw-r--r--support/make4ht/extensions/make4ht-ext-common_filters.lua2
-rw-r--r--support/make4ht/extensions/make4ht-ext-dvisvgm_hashes.lua4
-rw-r--r--support/make4ht/extensions/make4ht-ext-join_colors.lua2
-rw-r--r--support/make4ht/extensions/make4ht-ext-mathjaxnode.lua2
-rw-r--r--support/make4ht/extensions/make4ht-ext-mjcli.lua2
-rw-r--r--support/make4ht/extensions/make4ht-ext-odttemplate.lua2
-rw-r--r--support/make4ht/extensions/make4ht-ext-staticsite.lua9
8 files changed, 14 insertions, 13 deletions
diff --git a/support/make4ht/extensions/make4ht-ext-common_domfilters.lua b/support/make4ht/extensions/make4ht-ext-common_domfilters.lua
index 6219c95fbd..f7fbcdad24 100644
--- a/support/make4ht/extensions/make4ht-ext-common_domfilters.lua
+++ b/support/make4ht/extensions/make4ht-ext-common_domfilters.lua
@@ -19,14 +19,14 @@ function M.modify_build(make)
local count = 0
if current_format == "odt" then
-- some formats doesn't make sense in the ODT format
- local process = filter {"joincharacters", "mathmlfixes"}
+ local process = filter ({"joincharacters", "mathmlfixes"}, "commondomfilters")
local charclasses = {mn = true, ["text:span"] = true, mi=true}
make:match("4oo$", process, {charclasses= charclasses})
-- match math documents
make:match("4om$", process, {charclasses= charclasses})
count = 2
else
- local process = filter {"fixinlines", "idcolons", "joincharacters", "mathmlfixes", "tablerows","booktabs", "sectionid", "itemparagraphs"}
+ local process = filter({"fixinlines", "idcolons", "joincharacters", "mathmlfixes", "tablerows","booktabs", "sectionid", "itemparagraphs"}, "commondomfilters")
make:match("html?$", process)
count = 1
end
diff --git a/support/make4ht/extensions/make4ht-ext-common_filters.lua b/support/make4ht/extensions/make4ht-ext-common_filters.lua
index 9b3e7f3f74..0d0ee979fd 100644
--- a/support/make4ht/extensions/make4ht-ext-common_filters.lua
+++ b/support/make4ht/extensions/make4ht-ext-common_filters.lua
@@ -2,7 +2,7 @@ local M = {}
local filter = require "make4ht-filter"
-local process = filter {"cleanspan-nat", "fixligatures", "hruletohr", "entities", "fix-links"}
+local process = filter({"cleanspan-nat", "fixligatures", "hruletohr", "entities", "fix-links"}, "commonfilters")
-- filters support only html formats
function M.test(format)
diff --git a/support/make4ht/extensions/make4ht-ext-dvisvgm_hashes.lua b/support/make4ht/extensions/make4ht-ext-dvisvgm_hashes.lua
index 8bf82e0588..53da32c3be 100644
--- a/support/make4ht/extensions/make4ht-ext-dvisvgm_hashes.lua
+++ b/support/make4ht/extensions/make4ht-ext-dvisvgm_hashes.lua
@@ -243,7 +243,7 @@ function M.modify_build(make)
end)
-- fix src attributes
- local process = filter {
+ local process = filter({
function(str, filename)
return str:gsub('src=["\'](.-)(["\'])', function(filename, endquote)
local newname = output_map[filename] or filename
@@ -251,7 +251,7 @@ function M.modify_build(make)
return 'src=' .. endquote .. newname .. endquote
end)
end
- }
+ }, "dvisvgmhashes")
make:match("htm.?$", process)
diff --git a/support/make4ht/extensions/make4ht-ext-join_colors.lua b/support/make4ht/extensions/make4ht-ext-join_colors.lua
index 4d72b0e15b..11e6d66fd2 100644
--- a/support/make4ht/extensions/make4ht-ext-join_colors.lua
+++ b/support/make4ht/extensions/make4ht-ext-join_colors.lua
@@ -9,7 +9,7 @@ function M.test(format)
end
function M.modify_build(make)
- local process = filter {"joincolors"}
+ local process = filter({"joincolors"}, "joincolors")
make:match("html?$", process)
return make
end
diff --git a/support/make4ht/extensions/make4ht-ext-mathjaxnode.lua b/support/make4ht/extensions/make4ht-ext-mathjaxnode.lua
index b9a44491ba..3b57351d05 100644
--- a/support/make4ht/extensions/make4ht-ext-mathjaxnode.lua
+++ b/support/make4ht/extensions/make4ht-ext-mathjaxnode.lua
@@ -13,7 +13,7 @@ function M.prepare_parameters(params)
end
function M.modify_build(make)
- local mathjax = filter { "mathjaxnode"}
+ local mathjax = filter({ "mathjaxnode"}, "mathjaxnode")
-- this extension needs mathml enabled
make:match("html?$",mathjax)
return make
diff --git a/support/make4ht/extensions/make4ht-ext-mjcli.lua b/support/make4ht/extensions/make4ht-ext-mjcli.lua
index e59b419cdf..8a60fab610 100644
--- a/support/make4ht/extensions/make4ht-ext-mjcli.lua
+++ b/support/make4ht/extensions/make4ht-ext-mjcli.lua
@@ -24,7 +24,7 @@ function M.prepare_parameters(params)
end
function M.modify_build(make)
- local mathjax = filter { "mjcli"}
+ local mathjax = filter({ "mjcli"}, "mjcli")
local params = {}
if detected_latex then
params.latex = true
diff --git a/support/make4ht/extensions/make4ht-ext-odttemplate.lua b/support/make4ht/extensions/make4ht-ext-odttemplate.lua
index 3b0af2a699..b3607fa477 100644
--- a/support/make4ht/extensions/make4ht-ext-odttemplate.lua
+++ b/support/make4ht/extensions/make4ht-ext-odttemplate.lua
@@ -8,7 +8,7 @@ M.test = function(format)
end
M.modify_build = function(make)
- local process = filter {"odttemplate"}
+ local process = filter({"odttemplate"}, "odttemplate")
make:match("4oy$", process)
return make
end
diff --git a/support/make4ht/extensions/make4ht-ext-staticsite.lua b/support/make4ht/extensions/make4ht-ext-staticsite.lua
index a9a5bcece7..b9272203a5 100644
--- a/support/make4ht/extensions/make4ht-ext-staticsite.lua
+++ b/support/make4ht/extensions/make4ht-ext-staticsite.lua
@@ -22,6 +22,7 @@ local function get_slug(settings)
-- escape
-- slug must contain the unescaped input name
local f = io.open(published_name, "w")
+ log:info("Publishing article", os.date("%Y-%m-%d %H:%M", time))
f:write(time)
f:close()
end
@@ -79,7 +80,7 @@ end
local function remove_maketitle(make)
-- use DOM filter to remove \maketitle block
local domfilter = require "make4ht-domfilter"
- local process = domfilter {
+ local process = domfilter({
function(dom)
local maketitles = dom:query_selector(".maketitle")
for _, el in ipairs(maketitles) do
@@ -88,7 +89,7 @@ local function remove_maketitle(make)
end
return dom
end
- }
+ }, "staticsite")
make:match("html$", process)
end
@@ -120,9 +121,9 @@ function M.modify_build(make)
-- we use an bogus match which will be executed only once as the very first one to insert
-- the filters
-- I should make filter from this
- local process = filter {
+ local process = filter({
"staticsite"
- }
+ }, "staticsite")
-- detect if we should remove maketitle
local site_settings = get_filter_settings "staticsite"