From 7d0c3f3bf085d96dad2e1ac1f606f0d53f376d69 Mon Sep 17 00:00:00 2001 From: sammyette Date: Tue, 11 Jul 2023 22:27:11 -0400 Subject: [PATCH] fix: set old moddocpath --- CHANGELOG.md | 1 + nature/commands/doc.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3a2c66..63f1778 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/nature/commands/doc.lua b/nature/commands/doc.lua index 15714d8..9653657 100644 --- a/nature/commands/doc.lua +++ b/nature/commands/doc.lua @@ -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')