v.parser: fix vfmt eating the file name in `$tmpl('non_existant_file')` (#10056)
parent
0d205510d5
commit
23513ae35c
|
@ -140,8 +140,8 @@ fn (mut p Parser) comp_call() ast.ComptimeCall {
|
||||||
path = os.join_path(dir, tmpl_path)
|
path = os.join_path(dir, tmpl_path)
|
||||||
}
|
}
|
||||||
if !os.exists(path) {
|
if !os.exists(path) {
|
||||||
// can be in `templates/`
|
|
||||||
if is_html {
|
if is_html {
|
||||||
|
// can be in `templates/`
|
||||||
path = os.join_path(dir, 'templates', fn_path_joined)
|
path = os.join_path(dir, 'templates', fn_path_joined)
|
||||||
path += '.html'
|
path += '.html'
|
||||||
}
|
}
|
||||||
|
@ -151,6 +151,7 @@ fn (mut p Parser) comp_call() ast.ComptimeCall {
|
||||||
scope: 0
|
scope: 0
|
||||||
is_vweb: true
|
is_vweb: true
|
||||||
method_name: n
|
method_name: n
|
||||||
|
args_var: literal_string_param
|
||||||
pos: start_pos.extend(p.prev_tok.position())
|
pos: start_pos.extend(p.prev_tok.position())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue