How to insert double quotes into String with interpolation in scala
You don't need to escape quotes in triple-quoted string, so s""""$value"""""
will work. Admittedly, it doesn't look good either.
This is a bug in Scala:
escape does not work with string interpolation
but maybe you can use:
scala> import org.apache.commons.lang.StringEscapeUtils.escapeJava
import org.apache.commons.lang.StringEscapeUtils.escapeJava
scala> escapeJava("this is a string\nover two lines")
res1: java.lang.String = this is a string\nover two lines