As of version 0.657, an if-then-else expression inside another if-then-else expression adds an extra level for every line after it. This does not occur if the nested if-then-else expression is surrounded by parentheses.
--!strict
local _cond = if 1
then if 2 then 3 else 4
else 5
--comment
local function _func()
--[[
owspamdcokie ok d
fwkroem kvf,ledp;s
]]
for i = 1, 5 do
local _ = '5'
end
repeat until false
end
Result:
Editor settings:
Expected behavior
No level of indentation is added and the script is formatted as if the expression was surrounded by parentheses.