guard to endless loop.

This commit is contained in:
mattn
2012-05-23 17:34:22 +09:00
parent cf8c5b35f7
commit c3ffd8727e

View File

@@ -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