diff options
Diffstat (limited to 'nomsu.lua')
| -rw-r--r-- | nomsu.lua | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -412,7 +412,7 @@ do end end for k, v in pairs(scope["#vars"] or { }) do - insert(buff, "<@" .. tostring(k) .. "> = " .. tostring(self:value_to_nomsu(v))) + insert(buff, "<%" .. tostring(k) .. "> = " .. tostring(self:value_to_nomsu(v))) end return concat(buff, "\n") end, @@ -853,6 +853,14 @@ end);]]):format(concat(buffer, "\n")) return _accum_0 end)(), "; ")) .. "})" end + elseif "string" == _exp_0 then + if value == "\n" then + return "'\\n'" + elseif not value:find([["]]) and not value:find("\n") and not value:find("\\") then + return "\"" .. value .. "\"" + else + return '".."\n ' .. (self:indent(value)) + end else return error("Unsupported value_to_nomsu type: " .. tostring(type(value))) end |
