Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty lines in tables are being erased #32

Open
AgentOttsel opened this issue Oct 15, 2018 · 0 comments
Open

Empty lines in tables are being erased #32

AgentOttsel opened this issue Oct 15, 2018 · 0 comments

Comments

@AgentOttsel
Copy link

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 = {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant