Lua: Indent array values

develop
lethosor 2015-03-22 14:04:03 -04:00
parent d382d94cbc
commit 38fa416ad1
1 changed files with 2 additions and 1 deletions

@ -878,7 +878,8 @@ function encode_value(self, value, parents, etc, options, indent)
end
if options.pretty then
result_value = "[ " .. table.concat(ITEMS, ", ") .. " ]"
local array_indent = indent .. tostring(options.indent or "")
result_value = "[\n" .. array_indent .. table.concat(ITEMS, ",\n" .. array_indent) .. "\n" .. indent .. "]"
else
result_value = "[" .. table.concat(ITEMS, ",") .. "]"
end