forked from VimPlug/emmet-vim
fixed haml filter to output inner value.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
" File: zencoding.vim
|
" File: zencoding.vim
|
||||||
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
||||||
" Last Change: 09-Mar-2010.
|
" Last Change: 09-Mar-2010.
|
||||||
" Version: 0.29
|
" Version: 0.30
|
||||||
" WebPage: http://github.com/mattn/zencoding-vim
|
" WebPage: http://github.com/mattn/zencoding-vim
|
||||||
" Description: vim plugins for HTML and CSS hi-speed coding.
|
" Description: vim plugins for HTML and CSS hi-speed coding.
|
||||||
" SeeAlso: http://code.google.com/p/zen-coding/
|
" SeeAlso: http://code.google.com/p/zen-coding/
|
||||||
@@ -1141,13 +1141,20 @@ function! s:zen_toString(...)
|
|||||||
if len(tmp)
|
if len(tmp)
|
||||||
let str .= '{' . tmp . ' }'
|
let str .= '{' . tmp . ' }'
|
||||||
endif
|
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 .= "/"
|
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 .= '<'
|
let str .= '<'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let inner = ''
|
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
|
if len(current.child) == 1 && len(current.child[0].name) == 0
|
||||||
let lines = split(current.child[0].value[1:-2], "\n")
|
let lines = split(current.child[0].value[1:-2], "\n")
|
||||||
let str .= " " . lines[0]
|
let str .= " " . lines[0]
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ script_name: ZenCoding.vim
|
|||||||
script_id: '2981'
|
script_id: '2981'
|
||||||
script_type: utility
|
script_type: utility
|
||||||
script_package: zencoding.vim
|
script_package: zencoding.vim
|
||||||
script_version: '0.29'
|
script_version: '0.30'
|
||||||
required_vim_version: '7.0'
|
required_vim_version: '7.0'
|
||||||
summary: vim plugins for HTML and CSS hi-speed coding.
|
summary: vim plugins for HTML and CSS hi-speed coding.
|
||||||
|
|
||||||
@@ -81,6 +81,8 @@ install_details: |
|
|||||||
copy zencoding.vim to your plugin directory.
|
copy zencoding.vim to your plugin directory.
|
||||||
|
|
||||||
versions:
|
versions:
|
||||||
|
- '0.30': |
|
||||||
|
This is an upgrade for ZenCoding.vim: Fixed key assign.
|
||||||
- '0.29': |
|
- '0.29': |
|
||||||
This is an upgrade for ZenCoding.vim: Changed leading key to '<c-y>' from '<c-z>'.
|
This is an upgrade for ZenCoding.vim: Changed leading key to '<c-y>' from '<c-z>'.
|
||||||
- '0.28': |
|
- '0.28': |
|
||||||
|
|||||||
Reference in New Issue
Block a user