Expressive Output - print table shows 2 elements in same line

Using Expressive Output Window, when printing a dictionary where an element is an empty table, it’s showing the next element in the same line:

local dic = {a={},b=123,c=321} -- "a" is empty, "b" will appear in the same line...
print(dic)
-- {
--    ["a"] = {},    ["b"] = 123,
--    ["c"] = 321
-- }

If the element is not empty, it’s showing correctly:

dic = {a={x=1},b=123,c=321} -- "a" is not empty, shows ok
print(dic)
-- {
--    ["a"] =  {
--       ["x"] = 1
--    },
--    ["b"] = 123,
--    ["c"] = 321
-- }
1 Like

This is included in the post, im going to try and explain the problem more clearly on his behalf however,

So this:

local dic = {a={},b=123,c=321} -- "a" is empty, "b" will appear in the same line...
print(dic)

Currently outputs:

-- {
--    ["a"] = {},    ["b"] = 123,
--    ["c"] = 321
-- }

Whereas it should be outputting:

-- {
--    ["a"] = {},  
--    ["b"] = 123,  
--    ["c"] = 321
-- }

To keep in line with the normal formatting of tables in the new output window.

2 Likes

It seems to be solved in the last Studio version.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.