Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix "else" indenting bug

  • Loading branch information...
commit f725fbc81c4d3f8a691f9162c3e0d5887920227d 1 parent 0363d0b
Tim Pope authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  indent/liquid.vim
3  indent/liquid.vim
View
@@ -53,9 +53,8 @@ function! GetLiquidIndent(...)
let line = substitute(line,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','')
let line .= matchstr(cline,'\C^\%(\s*{%\s*end\w*\s*%}\)\+')
let cline = substitute(cline,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','')
- let ind += &sw * s:count(line,'{%\s*\%(if\|elsif\|else\|unless\|ifchanged\|case\|when\|for\|tablerow\|capture\)\>')
+ let ind += &sw * s:count(line,'{%\s*\%(if\|elsif\|else\|unless\|ifchanged\|case\|when\|for\|empty\|tablerow\|capture\)\>')
let ind -= &sw * s:count(line,'{%\s*end\%(if\|unless\|ifchanged\|case\|for\|tablerow\|capture\)\>')
- let ind += &sw * s:count(line,'{%\s*\%(elsif\|else\|when\|empty\)\>')
let ind -= &sw * s:count(cline,'{%\s*\%(elsif\|else\|when\|empty\)\>')
let ind -= &sw * s:count(cline,'{%\s*end\w*$')
return ind
Please sign in to comment.
Something went wrong with that request. Please try again.