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

ruby reserved words as hash keys affect indenting incorrectly.

Open kwerle opened this issue 8 years ago • 0 comments

Prerequisites

  • [X] Put an X between the brackets on this line if you have done all of the following:
    • Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
    • Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
    • Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
    • Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
    • Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages

Description

If you use ruby reserved words as keys in a hash they affect indenting [incorrectly]

Steps to Reproduce

audo indent the following:

{
  foo: :bar,
end: :bar,
if: :bar,
  def: :bar,
    baz: :bar,
  else: :bar,
    baz: :bar,
  }

Expected behavior:

{
  foo: :bar,
  end: :bar,
  if: :bar,
  def: :bar,
  baz: :bar,
  else: :bar,
  baz: :bar,
}

Actual behavior:

{
  foo: :bar,
end: :bar,
if: :bar,
  def: :bar,
    baz: :bar,
  else: :bar,
    baz: :bar,
  }

Reproduces how often: 100%

kwerle avatar Nov 05 '17 17:11 kwerle