Skip to content

Commit

Permalink
v.parser: fix vfmt eating the file name in `$tmpl('non_existant_file'…
Browse files Browse the repository at this point in the history
…)` (#10056)
  • Loading branch information
LouisSchmieder committed May 8, 2021
1 parent 0d20551 commit 23513ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vlib/v/parser/comptime.v
Expand Up @@ -140,8 +140,8 @@ fn (mut p Parser) comp_call() ast.ComptimeCall {
path = os.join_path(dir, tmpl_path)
}
if !os.exists(path) {
// can be in `templates/`
if is_html {
// can be in `templates/`
path = os.join_path(dir, 'templates', fn_path_joined)
path += '.html'
}
Expand All @@ -151,6 +151,7 @@ fn (mut p Parser) comp_call() ast.ComptimeCall {
scope: 0
is_vweb: true
method_name: n
args_var: literal_string_param
pos: start_pos.extend(p.prev_tok.position())
}
}
Expand Down

0 comments on commit 23513ae

Please sign in to comment.