fix: set old moddocpath

pull/240/head
sammyette 2023-07-11 22:27:11 -04:00
parent 48a06f8022
commit 7d0c3f3bf0
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
2 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@
- `flush()` and `autoFlush()` related to flushing outputs
- `pipe` property to check if a sink with input is a pipe (like stdin)
- Show indexes on cdr list
- Fix doc command not displaying correct subdocs when using shorthand api doc access (`doc api hilbish.jobs` as an example)
### Fixed
- Replaced `sed` in-place editing with `grep` and `mv` for compatibility with BSD utils

View File

@ -39,7 +39,7 @@ Available sections: ]] .. table.concat(modules, ', ')
subdocName = '_index'
end
f = io.open(moddocPath .. subdocName .. '.md', 'rb')
local oldmoddocPath
local oldmoddocPath = moddocPath
if not f then
moddocPath = moddocPath .. subdocName:match '%w+' .. '/'
f = io.open(moddocPath .. subdocName .. '.md', 'rb')