mirror of https://github.com/Hilbis/Hilbish
feat(commands/doc): make it easier to get interface docs
parent
07a7a75b46
commit
354f257c03
|
@ -24,6 +24,9 @@ commander.register('doc', function(args)
|
||||||
subdocName = '_index'
|
subdocName = '_index'
|
||||||
end
|
end
|
||||||
f = io.open(moddocPath .. subdocName .. '.md', 'rb')
|
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
|
if not f then
|
||||||
moddocPath = moddocPath .. subdocName .. '/'
|
moddocPath = moddocPath .. subdocName .. '/'
|
||||||
subdocName = args[3] or '_index'
|
subdocName = args[3] or '_index'
|
||||||
|
|
Loading…
Reference in New Issue