From 42e3770909de7ae6628bb7656060ceb1993c5b4b Mon Sep 17 00:00:00 2001 From: mattn Date: Thu, 30 Oct 2014 14:58:27 +0900 Subject: Fix removing _define_ --- autoload/sonictemplate.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/sonictemplate.vim b/autoload/sonictemplate.vim index 116a1aa..9f742ff 100644 --- a/autoload/sonictemplate.vim +++ b/autoload/sonictemplate.vim @@ -247,7 +247,7 @@ function! sonictemplate#apply(name, mode, ...) abort endif let var = substitute(match, mx, '\1', 'ig') let val = eval(substitute(match, mx, '\2', 'ig')) - let c = substitute(c, mx, '', 'g') + let c = substitute(c, '{{_define_:' . var . ':\(.\{-}\)}}\s*', '', 'g') let c = substitute(c, '\V{{_var_:'.var.'}}', '\=val', 'g') let s:vars[ft][var] = val endwhile -- cgit v1.2.3-54-g00ecf