2
3
зеркало из https://github.com/sammy-ette/Hilbish synced 2025-08-10 02:52:03 +00:00

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

Этот коммит содержится в:
sammyette 2021-10-17 18:10:06 -04:00
родитель 9b6ca1faf4
Коммит 3042fce50e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 50EE40A2809851F5

Просмотреть файл

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