fix: cleanup since returned tables from functions aren't userdata anymore

pull/78/head
sammyette 2021-10-17 18:10:06 -04:00
parent 9b6ca1faf4
commit 3042fce50e
No known key found for this signature in database
GPG Key ID: 50EE40A2809851F5
1 changed files with 2 additions and 10 deletions

View File

@ -44,11 +44,7 @@ commander.register('doc', function(args)
local globalDesc = [[
These are the global Hilbish functions that are always available and not part of a module.]]
if #args > 0 then
local mod = ''
for i = 1, #args do
mod = mod .. tostring(args[i]) .. ' '
end
mod = mod:gsub('^%s*(.-)%s*$', '%1')
local mod = table.concat(args, ' '):gsub('^%s*(.-)%s*$', '%1')
local f = io.open(moddocPath .. mod .. '.txt', 'rb')
if not f then
@ -83,11 +79,7 @@ Usage: doc <module>
Available modules: ]]
local mods = ''
for i = 1, #modules do
mods = mods .. tostring(modules[i]):gsub('.txt', '') .. ', '
end
print(mods)
print(table.concat(modules, ', '))
return
end)