1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

compiler: update to get vweb working

This commit is contained in:
joe-conigliaro
2019-11-25 21:48:26 +11:00
committed by Alexander Medvednikov
parent 475807566d
commit 7158a012c3
3 changed files with 56 additions and 21 deletions

View File

@@ -28,7 +28,7 @@ pub fn compile_template(path string) string {
lines := html.split_into_lines()
mut s := strings.new_builder(1000)
base := path.all_after('/').replace('.html', '')
s.writeln('module main import strings fn ${base}_view() string { // this line will get removed becase only function body is embedded
s.writeln('
mut sb := strings.new_builder(${lines.len * 30})
header := \'$header\'
_ = header