From c3ffd8727ebc7cdd26c0ee6d388394bb13b88d9e Mon Sep 17 00:00:00 2001 From: mattn Date: Wed, 23 May 2012 17:34:22 +0900 Subject: [PATCH] guard to endless loop. --- autoload/zencoding/html.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/zencoding/html.vim b/autoload/zencoding/html.vim index e1e7d13..82cb118 100644 --- a/autoload/zencoding/html.vim +++ b/autoload/zencoding/html.vim @@ -8,7 +8,9 @@ function! zencoding#html#findTokens(str) let str = a:str while len(str) > 0 let token = matchstr(str, s:mx.'\s*$') - if token =~ '^\s' + if token == '' + break + elseif token =~ '^\s' let token = substitute(token, '^\s*', '', '') let str = str[0 : -len(token)-1] break