"Unable to format" to auto-format
I clicked the auto-format code button and the entire contents of the file disappeared and was replaced by
Unable to format
[string "isCodeValid"]:5: '}' expected near ')'
And it is now impossible to restore the contents of the file.
It seems to me that it should not work like this
Verrrry strange. Definitely a bug. For now, just go back into the file's history and restore it to an older version.
Also, what steps did you take before auto-formatting? I haven't used Lua's autoformatter, so it could be an error with that.
EDIT: I just tried the autoformatter on some small-scale code and it seemed to work just fine. Maybe there was something specifically with your code that triggered it, but it's hard to say.