Skip to content

Commit

Permalink
Fix issue with closed component
Browse files Browse the repository at this point in the history
The last column of a closed component happens to still start with
"mustache". We need to check for a closing "}}".
  • Loading branch information
AndrewRadev committed Mar 27, 2017
1 parent e340ee2 commit 7f53b0b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions indent/handlebars.vim
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ function! GetHandlebarsIndent(...)
" check for a hanging attribute
let last_plnum_col = col([plnum, '$']) - 1
if synIDattr(synID(plnum, last_plnum_col, 1), "name") =~ '^mustache'
\ && pline !~# '}}\s*$'
let hanging_attribute_pattern = '{{\#\=\%(\k\|[/-]\)\+\s\+\zs\k\+='
let just_component_pattern = '^\s*{{\%(\k\|[/-]\)\+\s*$'

Expand Down

0 comments on commit 7f53b0b

Please sign in to comment.