This patch introduces formatting for all blocklike constructs (if/try/function/begin/for/while/...) such that inner block always start and end with a newline character.
For example,
if x print("x") else print("y") end
will be reformatted as
if x
print("x")
else
print("y")
end
An exception is (currently) made for comments, for example
if x # comment
print("x")
end
will not be formatted as
if x
# comment
print("x")
end
even though the comment is technically inside the block.
This patch introduces formatting for all blocklike constructs (
if
/try
/function
/begin
/for
/while
/...) such that inner block always start and end with a newline character.For example,
will be reformatted as
An exception is (currently) made for comments, for example
will not be formatted as
even though the comment is technically inside the block.
Closes #35.