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

Pasting heredoc doesn't auto indent correctly

Open jnunemaker opened this issue 10 years ago • 3 comments
trafficstars

  1. Paste heredoc:
sql = <<-SQL
  blah1
  blah2
SQL
  1. Expect:
sql = <<-SQL
  blah1
  blah2
SQL
  1. Actual:
sql = <<-SQL
blah1
blah2
SQL

Note the missing indention for blah1 and blah2. I've noticed it with other things in ruby as well like certain blocks and if/else statements.

jnunemaker avatar Jan 22 '15 16:01 jnunemaker

screen shot 2015-01-22 at 11 42 24 am

jnunemaker avatar Jan 22 '15 16:01 jnunemaker

screen shot 2015-01-22 at 11 42 41 am

jnunemaker avatar Jan 22 '15 16:01 jnunemaker

Also happens with this syntax:

  1. Paste this:
Blah.run sql,
  :foo => "bar",
  :baz => "wick"
  1. Expected
Blah.run sql,
  :foo => "bar",
  :baz => "wick"
  1. Actual:
Blah.run sql,
:foo => "bar",
:baz => "wick"

jnunemaker avatar Jan 22 '15 16:01 jnunemaker