diff --git a/nature/commands/doc.lua b/nature/commands/doc.lua index bc45eea..f8eec18 100644 --- a/nature/commands/doc.lua +++ b/nature/commands/doc.lua @@ -24,6 +24,9 @@ commander.register('doc', function(args) subdocName = '_index' end f = io.open(moddocPath .. subdocName .. '.md', 'rb') + if not f then + f = io.open(moddocPath .. subdocName:match '%w+' .. '/' .. subdocName .. '.md', 'rb') + end if not f then moddocPath = moddocPath .. subdocName .. '/' subdocName = args[3] or '_index'