You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following Lua/Luau function with some bad formatting and a strange choice of comment locations:
function foo(f, g, a, b, c)
return f(a)
or g(b and c
-- a somewhat strange location to describe something
or false
-- yes, this newline might not have been intended
)
end
After running StyLua 0.16.0 once, I get the following result:
function foo(f, g, a, b, c)
return f(a)
or g(
b and c -- a somewhat strange location to describe something
or false
-- yes, this newline might not have been intended
)
end
If I run it again, or false expression gets embedded into the comment changing the meaning of the code ('g' can now be called with 'nil' if 'b' is 'nil'):
function foo(f, g, a, b, c)
return f(a)
or g(
b and c -- a somewhat strange location to describe something or false
-- yes, this newline might not have been intended
)
end
The text was updated successfully, but these errors were encountered:
I have the following Lua/Luau function with some bad formatting and a strange choice of comment locations:
After running StyLua 0.16.0 once, I get the following result:
If I run it again,
or false
expression gets embedded into the comment changing the meaning of the code ('g' can now be called with 'nil' if 'b' is 'nil'):The text was updated successfully, but these errors were encountered: