From 088e326bd17cc4c8365b88b3a5ad060161012ca2 Mon Sep 17 00:00:00 2001 From: sammyette Date: Fri, 20 Jan 2023 18:43:46 -0400 Subject: [PATCH] fix(commands/doc): properly block out index doc --- nature/commands/doc.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nature/commands/doc.lua b/nature/commands/doc.lua index f15ab8e..379b364 100644 --- a/nature/commands/doc.lua +++ b/nature/commands/doc.lua @@ -53,11 +53,11 @@ Available sections: ]] .. table.concat(modules, ', ') end end funcdocs = f:read '*a':gsub('-([%d]+)', '%1') - local moddocs = table.filter(fs.readdir(moddocPath), function(f) return f ~= '_index.md' or f ~= 'index.md' end) + local moddocs = table.filter(fs.readdir(moddocPath), function(f) return f ~= '_index.md' and f ~= 'index.md' end) local subdocs = table.map(moddocs, function(fname) return lunacolors.underline(lunacolors.blue(string.gsub(fname, '.md', ''))) end) - if subdocName == '_index' then + if #moddocs ~= 0 then funcdocs = funcdocs .. '\nSubdocs: ' .. table.concat(subdocs, ', ') end