mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-08 11:34:46 +08:00
ignore django template
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user