Open matthias314 opened 2 months ago
Currently, a multiline tuple without parentheses receives indentation for all but the first element:
This is a result of the "expression spanning multiple lines are indented" rule. I agree it looks a bit weird in isolation perhaps, but when do you really have a implicit tuple like that? The rule is supposed to format e.g.
letters = a, b, c, d,
e, f, g, h
into
letters = a, b, c, d,
e, f, g, h
to make it more clear that the second line is a continuation of the first one.
The current behavior looks particularly strange to me when a docstring is shared between two functions:
I don't think I have ever seen code written like that with a top level tuple of functions. The typical way would be to write:
"docstring for f and g"
f, g
function f(x)
x
end
function g(y)
y
end
Anyway, looks like some bug anyway, I would have expected the result to be
"docstring for f and g"
function f(x)
x
end,
function g(y)
y
end
Currently, a multiline tuple without parentheses receives indentation for all but the first element:
Should all elements rather be treated equally (as they are in the presence of parentheses)?
The current behavior looks particularly strange to me when a docstring is shared between two functions:
Note that the function body of
f
is indented two levels and that the finalend
is not aligned with thefunction
it closes.