fix(commands/doc): properly block out index doc

multiline
sammyette 2023-01-20 18:43:46 -04:00
parent c87fbe2b99
commit 088e326bd1
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 2 additions and 2 deletions

View File

@ -53,11 +53,11 @@ Available sections: ]] .. table.concat(modules, ', ')
end end
end end
funcdocs = f:read '*a':gsub('-([%d]+)', '%1') 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) local subdocs = table.map(moddocs, function(fname)
return lunacolors.underline(lunacolors.blue(string.gsub(fname, '.md', ''))) return lunacolors.underline(lunacolors.blue(string.gsub(fname, '.md', '')))
end) end)
if subdocName == '_index' then if #moddocs ~= 0 then
funcdocs = funcdocs .. '\nSubdocs: ' .. table.concat(subdocs, ', ') funcdocs = funcdocs .. '\nSubdocs: ' .. table.concat(subdocs, ', ')
end end