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

stylua adds superfluous newlines after every if-expression #297

Closed
matthargett opened this issue Nov 12, 2021 · 1 comment · Fixed by #301
Closed

stylua adds superfluous newlines after every if-expression #297

matthargett opened this issue Nov 12, 2021 · 1 comment · Fixed by #301
Labels
bug Something isn't working

Comments

@matthargett
Copy link

		it("should work", function()
			local foo = 1

			local bar = if foo > 1 then 1 else 2
			bar = if foo > 1 then 1 else 2
		end)

formats to

		it("should work", function()
			local foo = 1

			local bar = if foo > 1 then 1 else 2

			bar = if foo > 1 then 1 else 2

		end)
@JohnnyMorganz JohnnyMorganz added the bug Something isn't working label Nov 13, 2021
@JohnnyMorganz
Copy link
Owner

another example from discord:

Autocomplete = function(player)
    return { if player then player.Name else nil }
end

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