ignore django template

This commit is contained in:
Yasuhiro Matsumoto
2015-10-26 09:44:07 +09:00
parent 1691ccc7e8
commit 4110fb0f7b

View File

@@ -1,6 +1,6 @@
let s:mx = '\([+>]\|[<^]\+\)\{-}\s*'
\ .'\((*\)\{-}\s*'
\ .'\([@#.]\{-}[a-zA-Z_\!][a-zA-Z0-9:_\!\-$]*\|{\%([^$}]\+\|\$#\|\${\w\+}\|\$\+\)*}*[ \t\r\n}]*\|\[[^\]]\+\]\)'
\ .'\([@#.]\{-}[a-zA-Z_\!][a-zA-Z0-9:_\!\-$]*\|{\%([^%$}]\+\|\$#\|\${\w\+}\|\$\+\)*}*[ \t\r\n}]*\|\[[^\]]\+\]\)'
\ .'\('
\ .'\%('
\ .'\%(#{[{}a-zA-Z0-9_\-\$]\+\|#[a-zA-Z0-9_\-\$]\+\)'
@@ -22,6 +22,13 @@ function! emmet#lang#html#findTokens(str) abort
endif
let pos = stridx(str, tag, pos) + len(tag)
endwhile
while 1
let tag = matchstr(str, '{%[^%]\{-}%}', pos)
if len(tag) == 0
break
endif
let pos = stridx(str, tag, pos) + len(tag)
endwhile
let last_pos = pos
while len(str) > 0
let token = matchstr(str, s:mx, pos)