Skip to content

Commit

Permalink
Merge pull request #1143 from kechako/fix-indentation-broken
Browse files Browse the repository at this point in the history
Fix indentation broken when using a action with a minus sign like `{{-'
  • Loading branch information
fatih authored Dec 17, 2016
2 parents 69e2b2c + a55c853 commit e15c781
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions indent/gohtmltmpl.vim
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ function! GetGoHTMLTmplIndent(lnum)

" If need to indent based on last line
let last_line = getline(a:lnum-1)
if last_line =~ '^\s*{{\s*\%(if\|else\|range\|with\|define\|block\).*}}'
if last_line =~ '^\s*{{-\=\s*\%(if\|else\|range\|with\|define\|block\).*}}'
let ind += sw
endif

" End of FuncMap block
let current_line = getline(a:lnum)
if current_line =~ '^\s*{{\s*\%(else\|end\).*}}'
if current_line =~ '^\s*{{-\=\s*\%(else\|end\).*}}'
let ind -= sw
endif

Expand Down

0 comments on commit e15c781

Please sign in to comment.