atom / language-ruby

Ruby package for Atom
Other
101 stars 144 forks source link

ruby reserved words as hash keys affect indenting incorrectly. #220

Open kwerle opened 7 years ago

kwerle commented 7 years ago

Prerequisites

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%