dfinity / vscode-motoko

Motoko language support for VS Code.
Apache License 2.0
42 stars 15 forks source link

multi line strings #184

Closed letmejustputthishere closed 1 year ago

letmejustputthishere commented 1 year ago

the formatter currently doesn't seem to like multi line string literals https://github.com/flowerpowerdao/power-equalizer/blob/428563c87a11115a133e8d41386eba3dfd1f4078/src/Http/lib.mo#L146

rvanasa commented 1 year ago

This is currently in the backlog (https://github.com/dfinity/prettier-plugin-motoko/issues/68).

I think this specific situation would be a good use case for // prettier-ignore because of the custom multi-line string layout. That being said, it makes sense for the formatter to automatically wrap and/or preserve whitespace for multi-line strings.

rvanasa commented 1 year ago

Closing since this is now supported in the formatter. In case anyone comes across this in the future, multi-line strings are also part of the Motoko language as of version 0.9.4.