From 7f53b0b95cc54eac8f2ad3103558b048effffa2b Mon Sep 17 00:00:00 2001 From: Andrew Radev Date: Mon, 27 Mar 2017 17:49:28 +0300 Subject: [PATCH] Fix issue with closed component The last column of a closed component happens to still start with "mustache". We need to check for a closing "}}". --- indent/handlebars.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/indent/handlebars.vim b/indent/handlebars.vim index c07566d..aa320d0 100644 --- a/indent/handlebars.vim +++ b/indent/handlebars.vim @@ -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*$'