mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-21 23:13:00 +00:00
split_shell: comment out debug
This commit is contained in:
parent
78c4a67c7b
commit
7bdefc8d42
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ local function split_shell(text, autotrim)
|
||||||
local acc = {}
|
local acc = {}
|
||||||
local mode = "NORMAL" -- NORMAL, INSIDE_QUOTES_SINGLE, INSIDE_QUOTES_DOUBLE
|
local mode = "NORMAL" -- NORMAL, INSIDE_QUOTES_SINGLE, INSIDE_QUOTES_DOUBLE
|
||||||
|
|
||||||
print("\n\n\n\n\nDEBUG:split_shell START text", text, "autotrim", autotrim)
|
-- print("\n\n\n\n\nDEBUG:split_shell START text", text, "autotrim", autotrim)
|
||||||
|
|
||||||
for i=1,text_length do
|
for i=1,text_length do
|
||||||
local prevchar = ""
|
local prevchar = ""
|
||||||
|
@ -64,7 +64,7 @@ local function split_shell(text, autotrim)
|
||||||
table.insert(acc, curchar)
|
table.insert(acc, curchar)
|
||||||
end
|
end
|
||||||
elseif mode == "INSIDE_QUOTES_SINGLE" then
|
elseif mode == "INSIDE_QUOTES_SINGLE" then
|
||||||
if curchar == "'" and prevchar ~= "\\" and is_whitespace(nextchar) then
|
if curchar == "'" and prevchar ~= "\\" and (is_whitespace(nextchar) or nextchar == "") then
|
||||||
-- It's the end of a quote!
|
-- It's the end of a quote!
|
||||||
mode = "NORMAL"
|
mode = "NORMAL"
|
||||||
elseif (curchar == "\\" and (
|
elseif (curchar == "\\" and (
|
||||||
|
|
Loading…
Reference in a new issue