forked from VimPlug/emmet-vim
fix numbering.
This commit is contained in:
@@ -47,14 +47,22 @@ function! zencoding#lang#haml#toString(settings, current, type, inline, filters,
|
|||||||
|
|
||||||
let inner = ''
|
let inner = ''
|
||||||
if len(current.value) > 0
|
if len(current.value) > 0
|
||||||
let lines = split(current.value[1:-2], "\n")
|
let text = current.value[1:-2]
|
||||||
|
let text = substitute(text, '\%(\\\)\@\<!\(\$\+\)\([^{#]\|$\)', '\=printf("%0".len(submatch(1))."d", itemno+1).submatch(2)', 'g')
|
||||||
|
let text = substitute(text, '\${nr}', "\n", 'g')
|
||||||
|
let text = substitute(text, '\\\$', '$', 'g')
|
||||||
|
let lines = split(text, "\n")
|
||||||
let str .= " " . lines[0]
|
let str .= " " . lines[0]
|
||||||
for line in lines[1:]
|
for line in lines[1:]
|
||||||
let str .= " |\n" . line
|
let str .= " |\n" . line
|
||||||
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
|
||||||
let lines = split(current.child[0].value[1:-2], "\n")
|
let text = current.child[0].value[1:-2]
|
||||||
|
let text = substitute(text, '\%(\\\)\@\<!\(\$\+\)\([^{#]\|$\)', '\=printf("%0".len(submatch(1))."d", itemno+1).submatch(2)', 'g')
|
||||||
|
let text = substitute(text, '\${nr}', "\n", 'g')
|
||||||
|
let text = substitute(text, '\\\$', '$', 'g')
|
||||||
|
let lines = split(text, "\n")
|
||||||
let str .= " " . lines[0]
|
let str .= " " . lines[0]
|
||||||
for line in lines[1:]
|
for line in lines[1:]
|
||||||
let str .= " |\n" . line
|
let str .= " |\n" . line
|
||||||
|
|||||||
@@ -323,7 +323,11 @@ function! zencoding#lang#html#toString(settings, current, type, inline, filters,
|
|||||||
let str .= " />"
|
let str .= " />"
|
||||||
else
|
else
|
||||||
let str .= ">"
|
let str .= ">"
|
||||||
let str .= current.value[1:-2]
|
let text = current.value[1:-2]
|
||||||
|
let text = substitute(text, '\%(\\\)\@\<!\(\$\+\)\([^{#]\|$\)', '\=printf("%0".len(submatch(1))."d", itemno+1).submatch(2)', 'g')
|
||||||
|
let text = substitute(text, '\${nr}', "\n", 'g')
|
||||||
|
let text = substitute(text, '\\\$', '$', 'g')
|
||||||
|
let str .= text
|
||||||
let nc = len(current.child)
|
let nc = len(current.child)
|
||||||
let dr = 0
|
let dr = 0
|
||||||
if nc > 0
|
if nc > 0
|
||||||
|
|||||||
@@ -35,13 +35,21 @@ function! zencoding#lang#slim#toString(settings, current, type, inline, filters,
|
|||||||
let inner = ''
|
let inner = ''
|
||||||
if len(current.value) > 0
|
if len(current.value) > 0
|
||||||
let str .= "\n"
|
let str .= "\n"
|
||||||
for line in split(current.value[1:-2], "\n")
|
let text = current.value[1:-2]
|
||||||
|
let text = substitute(text, '\%(\\\)\@\<!\(\$\+\)\([^{#]\|$\)', '\=printf("%0".len(submatch(1))."d", itemno+1).submatch(2)', 'g')
|
||||||
|
let text = substitute(text, '\${nr}', "\n", 'g')
|
||||||
|
let text = substitute(text, '\\\$', '$', 'g')
|
||||||
|
for line in split(text, "\n")
|
||||||
let str .= " | " . line . "\n"
|
let str .= " | " . 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
|
||||||
let str .= "\n"
|
let str .= "\n"
|
||||||
for line in split(current.child[0].value[1:-2], "\n")
|
let text = current.child[0].value[1:-2]
|
||||||
|
let text = substitute(text, '\%(\\\)\@\<!\(\$\+\)\([^{#]\|$\)', '\=printf("%0".len(submatch(1))."d", itemno+1).submatch(2)', 'g')
|
||||||
|
let text = substitute(text, '\${nr}', "\n", 'g')
|
||||||
|
let text = substitute(text, '\\\$', '$', 'g')
|
||||||
|
for line in split(text, "\n")
|
||||||
let str .= " | " . line . "\n"
|
let str .= " | " . line . "\n"
|
||||||
endfor
|
endfor
|
||||||
elseif len(current.child) > 0
|
elseif len(current.child) > 0
|
||||||
|
|||||||
Reference in New Issue
Block a user