Skip to content

Comments in unusual locations of a table lead to syntax errors #318

@idbrii

Description

@idbrii

Similar to #23 and #307, comments inside a table definition makes stylua create invalid syntax:

local a = {
    b =  -- a comment breaks it
    {
        c = "d",
    },
}

becomes

local a = {
    b =  -- a comment breaks it{
        c = "d",
    },
}

Tested on v0.11.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions