Skip to content

Inconsistent indentation for anonymous function assignments with comments. #627

@bmcq-0

Description

@bmcq-0

See the following code:

t = t or function()
	print("Hello, World") -- comment
end

t = t or function()
	print("Hello, World")
end

These are the exact same. However, the first has a comment in one of the statements. When formatting, this seems to somehow cause indentation inconsistencies:

t = t or function()
		print("Hello, World") -- comment
	end

t = t or function()
	print("Hello, World")
end

The comment can be anywhere, but the assinment seems to have to be in the form of a binary operation (?) (t = function()... does not yield the same inconsistencies, only t = t or ...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions