Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Incorrect indentation of operator continuations in blocks #81

Closed
garybernhardt opened this Issue · 2 comments

2 participants

@garybernhardt

As of current master (3e56518), this code is indented incorrectly:

    x { y >>
        z }
        w

w should be lined up with x.

For curiosity, the actual code where I found this indentation problem was a Parslet parser (shown without indentation bug here):

    rule(:id)      { space? >>
                     keyword.absent? >> match('[a-z+\-*]').repeat(1) >>
                     space? }
    rule(:keyword) { str("def") }
@AndrewRadev
Collaborator

From what I understand, the problem is the same as the one causing issue #83, so I'm going to close this as a duplicate and take the discussion there.

@garybernhardt

Ahh, yes—it doesn't indent this way if the terminator is on its own line. That didn't cross my mind. Thanks, Andrew.

@AndrewRadev AndrewRadev referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@AndrewRadev AndrewRadev referenced this issue from a commit
@AndrewRadev AndrewRadev Merge branch 'tests'
* tests:
  Spec for issue 132
  Spec for issue 108
  Tests for issue 130
  Spec
  One more spec for issue #81
  Migrate an example to a spec
  Introduce tests
783dfa5
@aschrab aschrab referenced this issue from a commit in aschrab/vim-ruby
@aschrab aschrab Merge branch 'master' into folding
* master:
  Workaround for Vim 7.4's HTML indent
  Another missing "*" escape
  Missing escape() for '*'
  allow Gemfile gems to be parsed and required
  Fix constant definitions after comments.
  Highlight unicode characters in constants
  Simplify ruby*Constant syntax group matching
  Remove s:save_cpo when we're done with it
  Fix keyword symbols after parentheses
  Basic "<<"-style heredoc indenting
  Reformat installer.
  Fix deprecation error.
  Work around weird --remote skip of finally
  Add appraisals to filetype detection.
  Fix Windows shell escaping issue
  Fix continuation issue again
  Spec for issue 132
  Spec for issue 108
  Tests for issue 130
  Spec
  One more spec for issue #81
  Migrate an example to a spec
  Introduce tests
  Add a rake compiler plugin
  Remove "Anon CVS" headers
  Highlight Ruby 2.0 symbol array syntax (%i)
  Add support for public_constant & private_constant (added in Ruby 1.9.3)
  Revert "Add symbols to string-like patterns"
  Correctly highlight identifiers with unicode characters
  Support Ruby 2.0's prepend keyword
  Fix incorrect match group reference
  Add symbols to string-like patterns
  Use s:Match instead of =~ to avoid matching strings or comments
  Highlight regexps after <<, +, -, and *
  Fix error when editing virtual files
  Highlight Ruby 1.9 overloadable operators
  Fix 'tags' in the default Ruby case
  Experimental support for .ruby-version
  Remove debugging variable
  Watch out for indent keywords with hanging brackets
  Adjust indenting after lines like "],"
  Remove unnecessary check
1c17bb2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.