Regression in parsing of trailing trivia for fields in a punctuated struct
Closed this issue · 1 comments
JohnnyMorganz commented
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
JohnnyMorganz commented
The problem occurs because the whitespace before the comment is from tab characters, not spaces