From 3b18a7fc7798c579a30976003d0e1b83fefba809 Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 8 Mar 2010 19:43:05 +0900 Subject: [PATCH] fixed issue #1. --- TUTORIAL | 6 ++++++ zencoding.vim | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/TUTORIAL b/TUTORIAL index ff14ca2..c5a7f8c 100644 --- a/TUTORIAL +++ b/TUTORIAL @@ -143,6 +143,12 @@ Tutorial of zencoding.vim hello world --> --------------------- + Type '/' in there again. + --------------------- +
+ hello world +
+ --------------------- 12. Make anchor from URL diff --git a/zencoding.vim b/zencoding.vim index ee2f456..72ccd1c 100644 --- a/zencoding.vim +++ b/zencoding.vim @@ -925,7 +925,7 @@ function! s:zen_parseIntoTree(abbr, type) endif if tag_name =~ '^{.*}$' let current.name = '' - let current.value = str + let current.value = tag_name else let current.value = value endif @@ -955,7 +955,11 @@ function! s:zen_parseIntoTree(abbr, type) endfor endif - call add(parent.child, current) + if len(current.name) + call add(parent.child, current) + else + let parent.value .= current.value + endif let last = current if block_start =~ '(' @@ -1171,7 +1175,7 @@ function! s:zen_expandAbbr(mode) range let leader = substitute(leader, mx, '', '') endif if leader =~ '\*' - let query = substitute(leader, '*', '*' . (a:lastline - a:firstline + 1), '') . '{$line$}' + let query = substitute(leader, '*', '*' . (a:lastline - a:firstline + 1), '') . '>{$line$}' let items = s:zen_parseIntoTree(query, type).child for item in items let expand .= s:zen_toString(item, type, 0, filter)