From 354f257c0385153663be19c6f867d9335479a86b Mon Sep 17 00:00:00 2001 From: sammyette Date: Sat, 7 Jan 2023 13:54:08 -0400 Subject: [PATCH] feat(commands/doc): make it easier to get interface docs --- nature/commands/doc.lua | 3 +++ 1 file changed, 3 insertions(+) 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'