Skip to content
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

Interpoloated multiline string formats differently than normal multiline string #1998

Closed
ckipp01 opened this issue May 29, 2020 · 0 comments · Fixed by #2001
Closed

Interpoloated multiline string formats differently than normal multiline string #1998

ckipp01 opened this issue May 29, 2020 · 0 comments · Fixed by #2001

Comments

@ckipp01
Copy link
Member

ckipp01 commented May 29, 2020

This template is a guideline, not a strict requirement.

  • Version: 2.5.3
  • Integration: Tried with Metals and CLI
  • Configuration:
version = "2.5.3"
align.preset = none
align.stripMargin = true
assumeStandardLibraryStripMargin = true

Steps

Given code like this:

  val x = """|This is a test
             | and another
             |yes
             |""".stripMargin

  val y = s"""|This is a test
              | and another
              |no
              |""".stripMargin

Problem

When I run scalafmt via the CLI or within Metal y becomes what I have below while x doesn't change.

  val x = """|This is a test
             | and another
             |yes
             |""".stripMargin

  val y = s"""|This is a test
             | and another
             |no
             |""".stripMargin

Expectation

I would expect that both of these behave the same way.

Workaround

None that I'm aware of.

Notes

I'm not sure if this was introduced #1837 or not, but it may have been.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant