mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-08 11:34:46 +08:00
fix indent for multiplier items.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
"=============================================================================
|
"=============================================================================
|
||||||
" zencoding.vim
|
" zencoding.vim
|
||||||
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
||||||
" Last Change: 11-Jun-2012.
|
" Last Change: 13-Jun-2012.
|
||||||
|
|
||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
@@ -176,8 +176,9 @@ function! zencoding#toString(...)
|
|||||||
for n in current.child
|
for n in current.child
|
||||||
let inner .= zencoding#toString(n, type, inline, filters, group_itemno)
|
let inner .= zencoding#toString(n, type, inline, filters, group_itemno)
|
||||||
endfor
|
endfor
|
||||||
let inner = substitute(inner, "\n", "\n" . indent, 'g')
|
"let inner = substitute(inner, "\n", "\n" . indent, 'g')
|
||||||
endif
|
endif
|
||||||
|
let inner = substitute(inner, "\n", "\n" . indent, 'g')
|
||||||
let str = substitute(str, '\${child}', inner, '')
|
let str = substitute(str, '\${child}', inner, '')
|
||||||
endif
|
endif
|
||||||
let itemno = itemno + 1
|
let itemno = itemno + 1
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ function! zencoding#lang#slim#toString(settings, current, type, inline, filters,
|
|||||||
let text = substitute(text, '\${nr}', "\n", 'g')
|
let text = substitute(text, '\${nr}', "\n", 'g')
|
||||||
let text = substitute(text, '\\\$', '$', 'g')
|
let text = substitute(text, '\\\$', '$', 'g')
|
||||||
for line in split(text, "\n")
|
for line in split(text, "\n")
|
||||||
let str .= " | " . line . "\n"
|
let str .= indent . "| " . line . "\n"
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
if len(current.child) == 1 && len(current.child[0].name) == 0
|
if len(current.child) == 1 && len(current.child[0].name) == 0
|
||||||
@@ -50,15 +50,15 @@ function! zencoding#lang#slim#toString(settings, current, type, inline, filters,
|
|||||||
let text = substitute(text, '\${nr}', "\n", 'g')
|
let text = substitute(text, '\${nr}', "\n", 'g')
|
||||||
let text = substitute(text, '\\\$', '$', 'g')
|
let text = substitute(text, '\\\$', '$', 'g')
|
||||||
for line in split(text, "\n")
|
for line in split(text, "\n")
|
||||||
let str .= " | " . line . "\n"
|
let str .= indent . "| " . line . "\n"
|
||||||
endfor
|
endfor
|
||||||
elseif len(current.child) > 0
|
elseif len(current.child) > 0
|
||||||
for child in current.child
|
for child in current.child
|
||||||
let inner .= zencoding#toString(child, type, inline, filters, itemno)
|
let inner .= zencoding#toString(child, type, inline, filters, itemno)
|
||||||
endfor
|
endfor
|
||||||
let inner = substitute(inner, "\n", "\n ", 'g')
|
let inner = substitute(inner, "\n", "\n" . indent, 'g')
|
||||||
let inner = substitute(inner, "\n $", "", 'g')
|
let inner = substitute(inner, "\n $", "", 'g')
|
||||||
let str .= "\n " . inner
|
let str .= "\n" . indent . inner
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
let str = current.value[1:-2]
|
let str = current.value[1:-2]
|
||||||
|
|||||||
Reference in New Issue
Block a user