diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-01-29 16:15:09 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-01-29 16:15:09 +0100 |
commit | 452587cdeefbf6e3bf1eee91e4e976f1135b785f (patch) | |
tree | e52f05dfd327c3b31a1b0fb82545dbdec639d2e2 /tex/context/base/mkiv/mlib-lua.lua | |
parent | 975f4f9f2d71d8021900955404f8b144ca6895f5 (diff) | |
download | context-452587cdeefbf6e3bf1eee91e4e976f1135b785f.tar.gz |
2016-01-28 22:37:00
Diffstat (limited to 'tex/context/base/mkiv/mlib-lua.lua')
-rw-r--r-- | tex/context/base/mkiv/mlib-lua.lua | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tex/context/base/mkiv/mlib-lua.lua b/tex/context/base/mkiv/mlib-lua.lua index e7f8f9cc5..baf9346c4 100644 --- a/tex/context/base/mkiv/mlib-lua.lua +++ b/tex/context/base/mkiv/mlib-lua.lua @@ -296,16 +296,14 @@ function metapost.runscript(code) if result then local t = type(result) if t == "number" then - t = f_numeric(result) - elseif t == "string" then - t = result - else - t = tostring(result) + result = f_numeric(result) + elseif t ~= "string" then + result = tostring(result) end if trace then - report_luarun("result: %s",code) + report_luarun("result: %s",result) end - return t + return result elseif trace then report_luarun("no result") end |