Skip to content

Commit

Permalink
fix: dont concat subdocs list if on main page
Browse files Browse the repository at this point in the history
  • Loading branch information
TorchedSammy committed Oct 25, 2023
1 parent 7288f85 commit 003100d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nature/commands/doc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Available sections: ]] .. table.concat(modules, ', ')


local doc, vals = handleYamlInfo(#args == 0 and doc or formatDocText(f:read '*a':gsub('-([%d]+)', '%1')))
if #moddocs ~= 0 then
if #moddocs ~= 0 and f then
doc = doc .. '\nSubdocs: ' .. table.concat(subdocs, ', ') .. '\n\n'
end
if f then f:close() end
Expand Down

0 comments on commit 003100d

Please sign in to comment.