New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standard Interpolator should call process, not treatEscapes #6559
Comments
Imported From: https://issues.scala-lang.org/browse/SI-6559?orig=1 |
@jsuereth said: def standardInterpolator(process: String => String, args: Seq[Any]): String = {
checkLengths(args)
val pi = parts.iterator
val ai = args.iterator
val bldr = new java.lang.StringBuilder(process(pi.next()))
while (ai.hasNext) {
bldr append ai.next
bldr append treatEscapes(pi.next())
}
bldr.toString
} This means that the raw interpolator does not work correctly: def raw(args: Any*): String = standardInterpolator(identity, args) |
Jan Niehusmann (jannic) said:
It seems like there is a patch already committed (0b7aaa5 by Julien Richard-Foy), which is on the master branch, but not in 2.10.0-RC2. |
@jsuereth said: |
@Ichoran said: |
@retronym said: |
@odersky said: |
@retronym said: |
Just looking at the source for StringContext. In the 'while (ai.hasNext)' loop, it calls treatEscapes. I think it should call the 'process' function passed in as a parameter.
The text was updated successfully, but these errors were encountered: