mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-07 11:14:26 +08:00
fix escape filter. close #85
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
"=============================================================================
|
"=============================================================================
|
||||||
" zencoding.vim
|
" zencoding.vim
|
||||||
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
||||||
" Last Change: 29-Jun-2012.
|
" Last Change: 02-Jul-2012.
|
||||||
|
|
||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
@@ -183,11 +183,6 @@ function! zencoding#toString(...)
|
|||||||
endif
|
endif
|
||||||
let itemno = itemno + 1
|
let itemno = itemno + 1
|
||||||
endwhile
|
endwhile
|
||||||
if zencoding#useFilter(filters, 'e')
|
|
||||||
let str = substitute(str, '&', '\&', 'g')
|
|
||||||
let str = substitute(str, '<', '\<', 'g')
|
|
||||||
let str = substitute(str, '>', '\>', 'g')
|
|
||||||
endif
|
|
||||||
return str
|
return str
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@@ -285,6 +280,11 @@ function! zencoding#expandAbbr(mode, abbr) range
|
|||||||
for item in items
|
for item in items
|
||||||
let expand .= zencoding#toString(item, type, 0, filters)
|
let expand .= zencoding#toString(item, type, 0, filters)
|
||||||
endfor
|
endfor
|
||||||
|
if zencoding#useFilter(filters, 'e')
|
||||||
|
let expand = substitute(expand, '&', '\&', 'g')
|
||||||
|
let expand = substitute(expand, '<', '\<', 'g')
|
||||||
|
let expand = substitute(expand, '>', '\>', 'g')
|
||||||
|
endif
|
||||||
let line = getline(a:firstline)
|
let line = getline(a:firstline)
|
||||||
let part = substitute(line, '^\s*', '', '')
|
let part = substitute(line, '^\s*', '', '')
|
||||||
for n in range(a:firstline, a:lastline)
|
for n in range(a:firstline, a:lastline)
|
||||||
@@ -328,6 +328,11 @@ function! zencoding#expandAbbr(mode, abbr) range
|
|||||||
for item in items
|
for item in items
|
||||||
let expand .= zencoding#toString(item, type, 0, filters)
|
let expand .= zencoding#toString(item, type, 0, filters)
|
||||||
endfor
|
endfor
|
||||||
|
if zencoding#useFilter(filters, 'e')
|
||||||
|
let expand = substitute(expand, '&', '\&', 'g')
|
||||||
|
let expand = substitute(expand, '<', '\<', 'g')
|
||||||
|
let expand = substitute(expand, '>', '\>', 'g')
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
elseif a:mode == 4
|
elseif a:mode == 4
|
||||||
let line = getline('.')
|
let line = getline('.')
|
||||||
@@ -363,6 +368,11 @@ function! zencoding#expandAbbr(mode, abbr) range
|
|||||||
for item in items
|
for item in items
|
||||||
let expand .= zencoding#toString(item, type, 0, filters)
|
let expand .= zencoding#toString(item, type, 0, filters)
|
||||||
endfor
|
endfor
|
||||||
|
if zencoding#useFilter(filters, 'e')
|
||||||
|
let expand = substitute(expand, '&', '\&', 'g')
|
||||||
|
let expand = substitute(expand, '<', '\<', 'g')
|
||||||
|
let expand = substitute(expand, '>', '\>', 'g')
|
||||||
|
endif
|
||||||
let expand = substitute(expand, '\$line\([0-9]\+\)\$', '\=submatch(1)', 'g')
|
let expand = substitute(expand, '\$line\([0-9]\+\)\$', '\=submatch(1)', 'g')
|
||||||
endif
|
endif
|
||||||
if len(expand)
|
if len(expand)
|
||||||
|
|||||||
Reference in New Issue
Block a user