Expands $# as content. close #116

This commit is contained in:
mattn
2013-04-09 18:05:28 +09:00
parent 4825e6b6c9
commit f5bb76ba39
4 changed files with 5 additions and 2 deletions

View File

@@ -62,6 +62,7 @@ function! zencoding#lang#haml#toString(settings, current, type, inline, filters,
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 = substitute(str, '\$#', text, 'g')
endif
let lines = split(text, "\n")
if len(lines) == 1

View File

@@ -351,6 +351,7 @@ function! zencoding#lang#html#toString(settings, current, type, inline, filters,
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 = substitute(str, '\("\zs$#\ze"\|\s\zs\$#"\|"\$#\ze\s\)', text, 'g')
endif
let str .= text
let nc = len(current.child)

View File

@@ -47,6 +47,7 @@ function! zencoding#lang#slim#toString(settings, current, type, inline, filters,
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 = substitute(str, '\$#', text, 'g')
endif
for line in split(text, "\n")
let str .= indent . "| " . line . "\n"