diff --git a/src/mobdebug.lua b/src/mobdebug.lua index f41667c..260950c 100644 --- a/src/mobdebug.lua +++ b/src/mobdebug.lua @@ -19,7 +19,7 @@ end)("os") local mobdebug = { _NAME = "mobdebug", - _VERSION = "0.7092", + _VERSION = "0.7093", _COPYRIGHT = "Paul Kulchenko", _DESCRIPTION = "Mobile Remote Debugger for the Lua programming language", port = os and os.getenv and tonumber((os.getenv("MOBDEBUG_PORT"))) or 8172, @@ -1378,9 +1378,7 @@ local function handle(params, client, options) local _, _, exp = string.find(params, "^[a-z]+%s+(.+)$") if exp or (command == "reload") then if command == "eval" or command == "exec" then - exp = (exp:gsub("%-%-%[(=*)%[.-%]%1%]", "") -- remove comments - :gsub("%-%-.-\n", " ") -- remove line comments - :gsub("\n", " ")) -- convert new lines + exp = exp:gsub("\n", "\r") -- convert new lines, so the fragment can be passed as one line if command == "eval" then exp = "return " .. exp end client:send("EXEC " .. exp .. "\n") elseif command == "reload" then