diff --git a/zencoding.vim b/zencoding.vim index ca8e684..e01fad8 100644 --- a/zencoding.vim +++ b/zencoding.vim @@ -2,7 +2,7 @@ " File: zencoding.vim " Author: Yasuhiro Matsumoto " Last Change: 09-Mar-2010. -" Version: 0.29 +" Version: 0.30 " 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/ @@ -1141,13 +1141,20 @@ function! s:zen_toString(...) if len(tmp) let str .= '{' . tmp . ' }' endif - if stridx(','.s:zen_settings['html'].empty_elements.',', ','.current.name.',') != -1 + if stridx(','.s:zen_settings['html'].empty_elements.',', ','.current.name.',') != -1 && len(current.value) == 0 let str .= "/" - elseif stridx(','.s:zen_settings['html'].block_elements.',', ','.current.name.',') != -1 && len(current.child) == 0 + elseif stridx(','.s:zen_settings['html'].block_elements.',', ','.current.name.',') != -1 && (len(current.child) == 0 && len(current.value) == 0) let str .= '<' endif let inner = '' + if len(current.value) > 0 + let lines = split(current.value[1:-2], "\n") + let str .= " " . lines[0] + for line in lines[1:] + let str .= " |\n" . line + endfor + endif if len(current.child) == 1 && len(current.child[0].name) == 0 let lines = split(current.child[0].value[1:-2], "\n") let str .= " " . lines[0] diff --git a/zencoding.vim.vimup b/zencoding.vim.vimup index 0c1b118..57b53e8 100644 --- a/zencoding.vim.vimup +++ b/zencoding.vim.vimup @@ -2,7 +2,7 @@ script_name: ZenCoding.vim script_id: '2981' script_type: utility script_package: zencoding.vim -script_version: '0.29' +script_version: '0.30' required_vim_version: '7.0' summary: vim plugins for HTML and CSS hi-speed coding. @@ -81,6 +81,8 @@ install_details: | copy zencoding.vim to your plugin directory. versions: +- '0.30': | + This is an upgrade for ZenCoding.vim: Fixed key assign. - '0.29': | This is an upgrade for ZenCoding.vim: Changed leading key to '' from ''. - '0.28': |