Feature Request: Multi-line Text Strings

I would love to have a syntax in Motoko for multi-line test strings, without having to surround each line in quotes and use #, or use a 3rd party tool to convert it to a format that uses \n characters.

For example, right now I’m writing tests for stripping out pieces of error messages. I’d like to create a variable, open ", copy/paste in the error message, and then close ". I’d imagine there are a million other reasons for wanting to do this type of copy/paste (handling regex, etc.).

If this already exists :raised_hands: - how can I use it?

2 Likes

It might exist in Kusanagi :slight_smile: cc @DanielXMoore

Multiline strings don’t exist in Kusanagi yet but I’ll add them soon!

As a quick update, multi-line strings are now available in Motoko (thanks to @kentosugama)!

5 Likes