BeautifyRuby icon indicating copy to clipboard operation
BeautifyRuby copied to clipboard

Heredoc EOF Indented

Open kyle-c9000 opened this issue 9 years ago • 1 comments

The ending EOF in a heredoc is indented this is breaking the heredoc:

body =<<EOF
This is a test email to send an attachement.
  EOF

kyle-c9000 avatar Nov 15 '16 22:11 kyle-c9000

Same issue for me:

self.joins(<<sql
         LEFT JOIN allergens_recipes ON allergens_recipes.recipe_id = recipes.id
         LEFT JOIN allergens ON allergens_recipes.allergen_id = allergens.id
sql
  )
  .where(sql_query , *params_query)
  .group(:id)
  .paginate( :page => params[:page] )
  .order('id DESC')

becomes:

self.joins(<<sql
           LEFT JOIN allergens_recipes ON allergens_recipes.recipe_id = recipes.id
           LEFT JOIN allergens ON allergens_recipes.allergen_id = allergens.id
           sql
           )
.where(sql_query , *params_query)
.group(:id)
.paginate( :page => params[:page] )
.order('id DESC')

and this broke my code

madeindjs avatar Jul 14 '17 16:07 madeindjs