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

vweb: embed context

This commit is contained in:
Alexander Medvednikov
2020-12-31 17:07:24 +01:00
parent cf978ca1ac
commit 3ffdcd8910
3 changed files with 22 additions and 22 deletions

View File

@@ -25,7 +25,7 @@ fn (mut g Gen) comptime_call(node ast.ComptimeCall) {
}
if is_html {
// return vweb html template
g.writeln('vweb__Context_html(&app->vweb, _tmpl_res_$g.fn_decl.name); strings__Builder_free(&sb); string_free(&_tmpl_res_$g.fn_decl.name);')
g.writeln('vweb__Context_html(&app->Context, _tmpl_res_$g.fn_decl.name); strings__Builder_free(&sb); string_free(&_tmpl_res_$g.fn_decl.name);')
} else {
// return $tmpl string
fn_name := g.fn_decl.name.replace('.', '__')