forked from VimPlug/emmet-vim
fixed indent for comment.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
"=============================================================================
|
"=============================================================================
|
||||||
" File: zencoding.vim
|
" File: zencoding.vim
|
||||||
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
||||||
" Last Change: 16-Mar-2010.
|
" Last Change: 17-Mar-2010.
|
||||||
" Version: 0.35
|
" Version: 0.35
|
||||||
" 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.
|
||||||
@@ -1198,7 +1198,9 @@ function! s:zen_toString(...)
|
|||||||
if attr == 'class' | let comment .= '.' . val | endif
|
if attr == 'class' | let comment .= '.' . val | endif
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
if len(comment) > 0 | let tmp = "<!-- " . comment . " -->\n" . comment_indent . tmp | endif
|
if len(comment) > 0
|
||||||
|
let tmp = "<!-- " . comment . " -->" . (inline ? "" : "\n") . comment_indent . tmp
|
||||||
|
endif
|
||||||
let str .= tmp
|
let str .= tmp
|
||||||
let inner = current.value[1:-2]
|
let inner = current.value[1:-2]
|
||||||
if stridx(','.s:zen_settings.html.inline_elements.',', ','.current.name.',') != -1
|
if stridx(','.s:zen_settings.html.inline_elements.',', ','.current.name.',') != -1
|
||||||
@@ -1231,7 +1233,6 @@ function! s:zen_toString(...)
|
|||||||
else
|
else
|
||||||
let str .= ">" . inner . "</" . current.name . ">"
|
let str .= ">" . inner . "</" . current.name . ">"
|
||||||
endif
|
endif
|
||||||
if len(comment) > 0 | let str .= "<!-- /" . comment . " -->\n" . comment_indent | endif
|
|
||||||
else
|
else
|
||||||
if inline == 0
|
if inline == 0
|
||||||
if stridx(','.s:zen_settings.html.empty_elements.',', ','.current.name.',') != -1
|
if stridx(','.s:zen_settings.html.empty_elements.',', ','.current.name.',') != -1
|
||||||
@@ -1243,7 +1244,6 @@ function! s:zen_toString(...)
|
|||||||
let str .= ">" . inner . '${cursor}</' . current.name . ">\n"
|
let str .= ">" . inner . '${cursor}</' . current.name . ">\n"
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
if len(comment) > 0 | let str .= "<!-- /" . comment . " -->\n" . comment_indent | endif
|
|
||||||
else
|
else
|
||||||
if stridx(','.s:zen_settings.html.empty_elements.',', ','.current.name.',') != -1
|
if stridx(','.s:zen_settings.html.empty_elements.',', ','.current.name.',') != -1
|
||||||
let str .= " />"
|
let str .= " />"
|
||||||
@@ -1252,6 +1252,9 @@ function! s:zen_toString(...)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
if len(comment) > 0
|
||||||
|
let str .= "<!-- /" . comment . " -->" . (inline ? "" : "\n") . comment_indent
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
if len(current.snippet) > 0
|
if len(current.snippet) > 0
|
||||||
let tmp = substitute(current.snippet, '|', '${cursor}', 'g')
|
let tmp = substitute(current.snippet, '|', '${cursor}', 'g')
|
||||||
|
|||||||
Reference in New Issue
Block a user