prettier-ruby icon indicating copy to clipboard operation
prettier-ruby copied to clipboard

Support heredoc squiggly syntax

Open AlanFoster opened this issue 7 years ago • 2 comments

Input

Ruby 2.3 supports the following syntax:

documentation = <<~HEREDOC.strip_heredoc
  hello world

  version: #{current_version}

  ----------------------------------------------------

  Usage:
    - etc
    - etc
    - etc
HEREDOC

Current output

documentation = 'hello world
'.strip_heredoc

Expected output

Same as input

AlanFoster avatar Jun 05 '18 22:06 AlanFoster

Note that you don’t need the .strip_heredoc here — the squiggly heredoc syntax does that for you.

j-f1 avatar Jun 05 '18 22:06 j-f1

@j-f1 Thanks for the heads up! :+1:

AlanFoster avatar Jun 05 '18 23:06 AlanFoster