feat(commands/doc): make it easier to get interface docs

readline-upstream
sammyette 2023-01-07 13:54:08 -04:00
parent 07a7a75b46
commit 354f257c03
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 3 additions and 0 deletions

View File

@ -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'