lua-fmt
lua-fmt copied to clipboard
Empty lines in tables are being erased
I think that empty lines in tables are good for separating groups of fields and describing them by using comments, like this:
local table = {
-- This field below is very interesting
field = "123",
-- WOW! Such nice fields!
anotherField = 345,
isThisVariableFalse = true,
-- Good choices!
favoriteColor = "#FF0000",
favoriteTrigonometricFunction = math.cos,
-- How poetic...
anEmptyTable = {}
}
However, running lua-fmt, all the empty lines get erased, which causes the code to look rather messy:
local table = {
-- This field below is very interesting
field = "123",
-- WOW! Such nice fields!
anotherField = 345,
isThisVariableFalse = true,
-- Good choices!
favoriteColor = "#FF0000",
favoriteTrigonometricFunction = math.cos,
-- How poetic...
anEmptyTable = {}
}