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