Skip to content

Regression in parsing of trailing trivia for fields in a punctuated struct #323

@JohnnyMorganz

Description

@JohnnyMorganz

Seeing a stylua regression for the following test case in v1.1.0

-- https://github.com/JohnnyMorganz/StyLua/issues/547
local too = {
	x,		-- string
	y		-- string
}

Before, the comments used to be parsed as trailing trivia for the comma after x, and for the y field respectively. Now the comments get parsed as leading trivia for y and the closing brace } respectively.

Blocks JohnnyMorganz/StyLua#854

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