File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -225,8 +225,7 @@ pub fn (mut p Parser) compile_template_file(template_file string, fn_name string
225
225
mut source := strings.new_builder (1000 )
226
226
source.writeln ('
227
227
import strings
228
- import veb as _
229
- // === veb html template ===
228
+ // === veb html template for file: ${template_file} ===
230
229
fn veb_tmpl_${fn_name} () string {
231
230
mut sb_${fn_name} := strings.new_builder(${lstartlength} )\n
232
231
@@ -457,7 +456,10 @@ fn veb_tmpl_${fn_name}() string {
457
456
source.writeln ('}' )
458
457
source.writeln ('// === end of veb html template_file: ${template_file} ===' )
459
458
460
- result := source.str ()
459
+ mut result := source.str ()
460
+ if result.contains ('veb.' ) {
461
+ result = 'import veb\n ' + result
462
+ }
461
463
$if trace_tmpl_expansion ? {
462
464
eprintln ('>>>>>>> template expanded to:' )
463
465
eprintln (result)
You can’t perform that action at this time.
0 commit comments