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

Sometimes result is over line width for inline function inside table #619

Closed
echasnovski opened this issue Nov 12, 2022 · 0 comments · Fixed by #625
Closed

Sometimes result is over line width for inline function inside table #619

echasnovski opened this issue Nov 12, 2022 · 0 comments · Fixed by #625
Labels
bug Something isn't working

Comments

@echasnovski
Copy link

Example file content:

local a = {
	aa = function() return "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" end,
}

Example command:
stylua --column-width 120 --collapse-simple-statement Always -- stylua-width-issue.lua (assuming 'stylua-width-issue.lua' has this code example)

With versions 0.15.2 (current release) and 0.14.0 it doesn't change formatting, although second line is way over 120. Adding one more "x" leads to splitting function definition into three lines.

My guess is that it somehow conflicts with performing hanging assignment.

@echasnovski echasnovski changed the title Sometime result is over line width for inline function inside table Sometimes result is over line width for inline function inside table Nov 12, 2022
@JohnnyMorganz JohnnyMorganz added the bug Something isn't working label Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants