mirror of https://github.com/Hilbis/Hilbish
fix: doc command not displaying correct subdocs when using shorthand api doc access
parent
5b4b055c6c
commit
48a06f8022
|
@ -34,18 +34,18 @@ Available sections: ]] .. table.concat(modules, ', ')
|
|||
local funcdocs = nil
|
||||
local subdocName = args[2]
|
||||
if not f then
|
||||
-- assume subdir
|
||||
-- dataDir/docs/<mod>/<mod>.md
|
||||
moddocPath = moddocPath .. mod .. '/'
|
||||
if not subdocName then
|
||||
subdocName = '_index'
|
||||
end
|
||||
f = io.open(moddocPath .. subdocName .. '.md', 'rb')
|
||||
local oldmoddocPath
|
||||
if not f then
|
||||
f = io.open(moddocPath .. subdocName:match '%w+' .. '/' .. subdocName .. '.md', 'rb')
|
||||
moddocPath = moddocPath .. subdocName:match '%w+' .. '/'
|
||||
f = io.open(moddocPath .. subdocName .. '.md', 'rb')
|
||||
end
|
||||
if not f then
|
||||
moddocPath = moddocPath .. subdocName .. '/'
|
||||
moddocPath = oldmoddocPath .. subdocName .. '/'
|
||||
subdocName = args[3] or '_index'
|
||||
f = io.open(moddocPath .. subdocName .. '.md', 'rb')
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue