mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-12-24 14:42:24 +01:00
//many, //multi, parse_reference: various luacheck fixes
This commit is contained in:
parent
c14bb40f7e
commit
655d9ebac9
@ -3,6 +3,7 @@
|
||||
|
||||
-- explode(separator, string)
|
||||
-- From http://lua-users.org/wiki/SplitJoin
|
||||
-- TODO: Refactor this to use wea.split instead
|
||||
local function explode(delim, str)
|
||||
local ll, is_done
|
||||
local delim_length = string.len(delim)
|
||||
@ -12,7 +13,7 @@ local function explode(delim, str)
|
||||
return function()
|
||||
if is_done then return end
|
||||
|
||||
local result = nil
|
||||
local result
|
||||
local loc = string.find(str, delim, ll, true) -- find the next d in the string
|
||||
if loc ~= nil then -- if "not not" found then..
|
||||
result = string.sub(str, ll, loc - 1) -- Save it in our array.
|
||||
|
@ -35,8 +35,6 @@ minetest.register_chatcommand("/multi", {
|
||||
params_text = worldeditadditions.trim(params_text)
|
||||
if #params_text == 0 then return false, "Error: No commands specified, so there's nothing to do." end
|
||||
|
||||
|
||||
local i = 1 -- For feedback only
|
||||
local master_start_time = worldeditadditions.get_ms_time()
|
||||
local times = {}
|
||||
|
||||
|
@ -37,7 +37,7 @@ function worldeditadditions.doc.parse_reference()
|
||||
function(item, i) return item.level ~= 2 end
|
||||
)
|
||||
for i,value in ipairs(headings) do
|
||||
print(i, "level", level, "heading", heading, "text", text)
|
||||
print(i, "level", value.level, "heading", value.heading, "text", value.text)
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user