Subtraction (-) does not autoformat correctly with statements spanning multiple lines

It should be fairly self-explanatory. Every operator will format as intended except the sub(-) symbol:

Using the “format document” option also causes this problem:

Expected behavior

Subtraction formats correctly in statements that span multiple lines.

1 Like

This is just an acknowledgment announcement!

We’ve filed a ticket into our internal database for this issue and will start investigating, we will update you when we have further information.

Thanks for flagging!

Hi @VegetationBush ,

Thanks for flagging this! This is a limitation of the current formatter, and the workaround is to use parentheses. We are planning a next-gen formatter and working on providing a better solution for this.

I’ve moved this request to the post:
https://devforum.roblox.com/t/collecting-suggestions-for-next-gen-script-editor-formatter/3555458

Please feel free to share more suggestions there.

Thank you!