From 9b9c05dc5cf64307a2bbd39e3e788c0c3715ed8b Mon Sep 17 00:00:00 2001 From: dvs1 Date: Wed, 15 Jan 2025 16:08:45 +1000 Subject: One of these days I'll figure out sorting. lol --- notYetAnotherWiki.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notYetAnotherWiki.lua b/notYetAnotherWiki.lua index 20cc6df..4ecf427 100755 --- a/notYetAnotherWiki.lua +++ b/notYetAnotherWiki.lua @@ -225,7 +225,7 @@ for name, file in pairs(Files) do for i, f in pairs(Subs[path].subs) do table.insert(subs, f) end - table.sort(subs, function(a, b) return (a <= b) end) + table.sort(subs, function(a, b) return (string.lower(a) <= string.lower(b)) end) for i, f in ipairs(subs) do local pth = path if '' ~= path then pth = path .. '/' end @@ -237,7 +237,7 @@ for name, file in pairs(Files) do metadata.menu = '' if nil == metadata.title then metadata.title = metadata.pagetitle end if nil == metadata.title then metadata.title = bit end - if nil ~= Subs[path].files then table.sort(Subs[path].files) end + if nil ~= Subs[path].files then table.sort(Subs[path].files, function(a, b) return (string.lower(a) <= string.lower(b)) end) end for i, f in ipairs(Subs[path].files) do local title, url = nil, nil if '' == path then -- cgit v1.1