mirror of
https://github.com/TangentFoxy/lovebird.git
synced 2025-07-28 02:52:19 +00:00
Added support for "=" input prefix to mimic Lua REPL
This commit is contained in:
@@ -37,6 +37,9 @@ if req.parsedbody.input then
|
||||
if lovebird.echoinput then
|
||||
lovebird.pushline({ type = 'input', str = str })
|
||||
end
|
||||
if str:find("^=") then
|
||||
str = "print(" .. str:sub(2) .. ")"
|
||||
end
|
||||
xpcall(function() assert(lovebird.loadstring(str, "input"))() end,
|
||||
lovebird.onerror)
|
||||
end
|
||||
|
Reference in New Issue
Block a user