Quantcast
Viewing all articles
Browse latest Browse all 180

Code formatting in Scala is wrong with multiple line string [duplicate]

I am asking this question after tackling this question:

How to test akka-http route to handle exception?

There is a lot of code there, bur as you can see the formatting is not correct for the first piece of code. It's treated as if it's a string. Let's consider the following example:

""" this is a string "this is still a string" another quote: " after the quote """

As you can see, this is still a string, and after the quote is not formatted as a string, although they should be. The rule is that single quotes are just part of the string when they are surrounded by triple quotes.

Here is a code run that helps demonstrating this.

Update

I've created this github issue which was fixed and merged.


Viewing all articles
Browse latest Browse all 180

Trending Articles