File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 38
38
39
39
-- determines whether `nodename` is a valid node name, returning a boolean
40
40
worldedit .normalize_nodename = function (nodename )
41
+ nodename = nodename :gsub (" ^%s*(.-)%s*$" , " %1" )
41
42
if nodename == " " then return nil end
42
43
local fullname = ItemStack ({name = nodename }):get_name () -- resolve aliases of node names to full names
43
44
if minetest .registered_nodes [fullname ] or fullname == " air" then -- directly found node name or alias of nodename
@@ -300,7 +301,7 @@ minetest.register_chatcommand("/mix", {
300
301
privs = {worldedit = true },
301
302
func = safe_region (function (name , param )
302
303
local nodes = {}
303
- for nodename in param :gmatch (" [^, ]+" ) do
304
+ for nodename in param :gmatch (" [^%s ]+" ) do
304
305
local node = get_node (name , nodename )
305
306
if not node then
306
307
worldedit .player_notify (name , " Could not identify node \" " .. name .. " \" " )
You can’t perform that action at this time.
0 commit comments