Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-9944

Multiline string interpolation eats carriage returns

    Details

      Description

      Having the following piece of code saved with Windows-style line endings (CRLF)

          implicit class TestStringContext(val context: StringContext) {
            def x(args: Any*): Unit = {
              context.parts.foreach(part => println(part.getBytes("UTF-8").toList))
            }
          }
          x"""
            ${1}
          """
      

      String interpolation eats carriage return

      List(13, 10, 32, 32, 32, 32, 32, 32)
      List(10, 32, 32, 32, 32)
      

      The first part starts with CRLF as expected, but the second part starts with LF only, CR is missing.

        Attachments

          Activity

            People

            • Assignee:
              apm A. P. Marki
              Reporter:
              yarulan Yaroslav Ulanovych
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: