summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/make4ht/filters/make4ht-staticsite.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts/make4ht/filters/make4ht-staticsite.lua')
-rw-r--r--Master/texmf-dist/scripts/make4ht/filters/make4ht-staticsite.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/Master/texmf-dist/scripts/make4ht/filters/make4ht-staticsite.lua b/Master/texmf-dist/scripts/make4ht/filters/make4ht-staticsite.lua
index 969d47ecaaa..5620f9c8bb6 100644
--- a/Master/texmf-dist/scripts/make4ht/filters/make4ht-staticsite.lua
+++ b/Master/texmf-dist/scripts/make4ht/filters/make4ht-staticsite.lua
@@ -7,7 +7,13 @@ local function make_yaml(tbl, level)
local indent = string.rep(" ", level)
-- indentation for multilen strings
local str_indent = string.rep(" ", level + 1)
- for k,v in pairs(tbl) do
+ local sorted = {}
+ for k, _ in pairs(tbl) do
+ sorted[#sorted+1] = k
+ end
+ table.sort(sorted)
+ for _,k in ipairs(sorted) do
+ local v = tbl[k]
if type(v)=="string" then
-- detect multiline strings
if v:match("\n") then