mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-07 03:04:27 +08:00
fixed storange behaviour in '<a href="">b_</a>'
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
" File: zencoding.vim
|
||||
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
||||
" Last Change: 19-Feb-2010.
|
||||
" Version: 0.5
|
||||
" Version: 0.6
|
||||
" WebPage: http://github.com/mattn/zencoding-vim
|
||||
" Description: vim plugins for HTML and CSS hi-speed coding.
|
||||
" SeeAlso: http://code.google.com/p/zen-coding/
|
||||
@@ -66,7 +66,7 @@
|
||||
" script type: plugin
|
||||
|
||||
if &cp || (exists('g:loaded_zencoding_vim') && g:loaded_zencoding_vim)
|
||||
finish
|
||||
"finish
|
||||
endif
|
||||
let g:loaded_zencoding_vim = 1
|
||||
|
||||
@@ -854,6 +854,9 @@ function! s:zen_parseIntoTree(abbr, type)
|
||||
endif
|
||||
call add(parent['child'], current)
|
||||
let last = current
|
||||
if len(tag_name) == 0
|
||||
break
|
||||
endif
|
||||
if 0
|
||||
echo "str=".str
|
||||
echo "operator=".operator
|
||||
@@ -933,8 +936,8 @@ endfunction
|
||||
|
||||
function! s:zen_expand()
|
||||
let line = getline('.')[:col('.')-1]
|
||||
let part = matchstr(line, '^.*\(\S*\)$')
|
||||
let rest = getline('.')[col('.'):]
|
||||
let part = matchstr(line, '\(\S*\)\s\{-}$')
|
||||
let rest = getline('.')[col('.')-1:]
|
||||
let type = &ft
|
||||
let items = s:zen_parseIntoTree(part, type)['child']
|
||||
let expand = len(items) ? s:zen_toString(items[0], type) : ''
|
||||
@@ -1007,5 +1010,6 @@ endif
|
||||
"echo ZenExpand('req', 'perl')
|
||||
"echo ZenExpand('html:4t>div#wrapper>div#header+div#contents+div#footer', '')
|
||||
"echo ZenExpand('a[href=http://www.google.com/].foo#hoge', '')
|
||||
"echo ZenExpand('b', '')
|
||||
|
||||
" vim:set et:
|
||||
|
||||
@@ -2,7 +2,7 @@ script_name: ZenCoding.vim
|
||||
script_id: '2981'
|
||||
script_type: utility
|
||||
script_package: zencoding.vim
|
||||
script_version: '0.5'
|
||||
script_version: '0.6'
|
||||
required_vim_version: '7.0'
|
||||
summary: vim plugins for HTML and CSS hi-speed coding.
|
||||
|
||||
@@ -67,6 +67,8 @@ install_details: |
|
||||
copy zencoding.vim to your plugin directory.
|
||||
|
||||
versions:
|
||||
- '0.6': |
|
||||
This is an upgrade for ZenCoding.vim: fixed strange behaviour about '<a href="">b_</a>'
|
||||
- '0.5': |
|
||||
This is an upgrade for ZenCoding.vim: recover rest part in line.
|
||||
- '0.4': |
|
||||
|
||||
Reference in New Issue
Block a user