Because of the lineBreakInCode() in the 'befores' we still get the same behavior as behavior which automatically aligns the 'end' for example. But comments are not automatically moved to the if's body
local t = {}
function t:a() -- this comment was always allowed since there was no code in the body
end
function t:b() -- this comment is now allowed
local randomNumber = math.random(10)
if randomNumber < 2 then -- this comment is now allowed
return 1
elseif randomNumber < 4 then -- this comment was always allowed since there was no code in the body
else -- this comment is now allowed
local test = 1
end
end
return t
Because of the lineBreakInCode() in the 'befores' we still get the same behavior as behavior which automatically aligns the 'end' for example. But comments are not automatically moved to the if's body