mirror of
https://github.com/rxi/lovebird.git
synced 2024-11-15 22:54:21 +00:00
Added support for "=" input prefix to mimic Lua REPL
This commit is contained in:
parent
df58a85248
commit
07e97d5627
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user