From c3631c60121856d52869131859b677cdbdbb063a Mon Sep 17 00:00:00 2001 From: mattn Date: Thu, 25 Feb 2010 02:31:14 +0900 Subject: [PATCH 1/2] add simply tests. --- zencoding.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zencoding.vim b/zencoding.vim index c651249..11ba511 100644 --- a/zencoding.vim +++ b/zencoding.vim @@ -1221,5 +1221,7 @@ endif "echo ZenExpand('(#header>h1)+(#content>(#main>h2+div#entry$.section*5>(h3>a)+div>p*3+ul+)+(#utilities))+(#footer>address)', '') "echo ZenExpand('#content>(#main>div#entry$*5>(h3>a)+div>p*3)+#utilities', '') "echo ZenExpand('(div>(ul))+(#utilities)', '') +"echo ZenExpand('(a>b)+(c+d)', '') +"echo zenexpand('(a>b)+(c>d)', '') " vim:set et: From 3258e56b41ccd3f589462b1f017ed9b5ca70839b Mon Sep 17 00:00:00 2001 From: mattn Date: Sat, 27 Feb 2010 01:35:40 +0900 Subject: [PATCH 2/2] remove white space. --- zencoding.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zencoding.vim b/zencoding.vim index af4a171..8266e45 100644 --- a/zencoding.vim +++ b/zencoding.vim @@ -1070,14 +1070,14 @@ function! s:zen_expand(mode) range let type = s:zen_get_filetype() let expand = '' if a:mode == 2 - let leader = input('Tag: ', '') + let leader = substitute(input('Tag: ', ''), ' ', '', 'g') if len(leader) == 0 return endif let line = '' let part = '' let rest = '' - if leader =~ '*' + if leader =~ '\*' let query = substitute(leader, '*', '{$line$}*' . (a:lastline - a:firstline + 1), '') let items = s:zen_parseIntoTree(query, type).child for item in items