Skip to content

Commit

Permalink
Fix rdoc comment indent
Browse files Browse the repository at this point in the history
These kind of comments seem to be often written as "=begin rdoc", which
wasn't accounted for.

Fixes issue #29
  • Loading branch information
AndrewRadev committed Aug 25, 2011
1 parent 05efe45 commit 8bee58b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions indent/ruby.vim
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ function s:PrevNonBlankNonString(lnum)
" Go in and out of blocks comments as necessary.
" If the line isn't empty (with opt. comment) or in a string, end search.
let line = getline(lnum)
if line =~ '^=begin$'
if line =~ '^=begin'
if in_block
let in_block = 0
else
break
endif
elseif !in_block && line =~ '^=end$'
elseif !in_block && line =~ '^=end'
let in_block = 1
elseif !in_block && line !~ '^\s*#.*$' && !(s:IsInStringOrComment(lnum, 1)
\ && s:IsInStringOrComment(lnum, strlen(line)))
Expand Down

0 comments on commit 8bee58b

Please sign in to comment.