Skip to content

[prism] (no-op) multiple newline escapes collapsed in heredocs #772

@froydnj

Description

@froydnj

Like #771, I don't think this matters, exactly, because the string content is the same, but recording for posterity.

description = <<~EOS
  This is a very long line that we are trying to extend for as long as possible to mirror the original example which I can't completely talk about.\
  \
  For other reasons, this would point at a useful URL

  Extra rationale.
EOS

p(description)

rubyfmt --prism produces:

description = <<~EOS
  This is a very long line that we are trying to extend for as long as possible to mirror the original example which I can't completely talk about.\
  For other reasons, this would point at a useful URL

  Extra rationale.
EOS

p(description)

Running the formatted code through Ruby indicates that they both produce the same thing, though, so 🤷‍♂️ .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions