aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authordvs12025-01-15 16:08:45 +1000
committerdvs12025-01-15 16:08:45 +1000
commit9b9c05dc5cf64307a2bbd39e3e788c0c3715ed8b (patch)
tree55eede98490941c2b9c56984e62b97d0385d32ee
parentAttempt to fix up not linking the current page in the menu. (diff)
downloadnotYetAnotherWiki-9b9c05dc5cf64307a2bbd39e3e788c0c3715ed8b.zip
notYetAnotherWiki-9b9c05dc5cf64307a2bbd39e3e788c0c3715ed8b.tar.gz
notYetAnotherWiki-9b9c05dc5cf64307a2bbd39e3e788c0c3715ed8b.tar.bz2
notYetAnotherWiki-9b9c05dc5cf64307a2bbd39e3e788c0c3715ed8b.tar.xz
One of these days I'll figure out sorting. lol
-rwxr-xr-xnotYetAnotherWiki.lua4
1 files 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
225 for i, f in pairs(Subs[path].subs) do 225 for i, f in pairs(Subs[path].subs) do
226 table.insert(subs, f) 226 table.insert(subs, f)
227 end 227 end
228 table.sort(subs, function(a, b) return (a <= b) end) 228 table.sort(subs, function(a, b) return (string.lower(a) <= string.lower(b)) end)
229 for i, f in ipairs(subs) do 229 for i, f in ipairs(subs) do
230 local pth = path 230 local pth = path
231 if '' ~= path then pth = path .. '/' end 231 if '' ~= path then pth = path .. '/' end
@@ -237,7 +237,7 @@ for name, file in pairs(Files) do
237 metadata.menu = '' 237 metadata.menu = ''
238 if nil == metadata.title then metadata.title = metadata.pagetitle end 238 if nil == metadata.title then metadata.title = metadata.pagetitle end
239 if nil == metadata.title then metadata.title = bit end 239 if nil == metadata.title then metadata.title = bit end
240 if nil ~= Subs[path].files then table.sort(Subs[path].files) end 240 if nil ~= Subs[path].files then table.sort(Subs[path].files, function(a, b) return (string.lower(a) <= string.lower(b)) end) end
241 for i, f in ipairs(Subs[path].files) do 241 for i, f in ipairs(Subs[path].files) do
242 local title, url = nil, nil 242 local title, url = nil, nil
243 if '' == path then 243 if '' == path then