internal_memory:22:626: error: invalid character `\`
just ran v up and now I get this error:
internal_memory:22:626: error: invalid character \
Do you get that error when you run v up? Are you trying to run a V program?
Please follow the bug template and provide the details necessary for reproduction.
just started happening today. no idea why:
$ v up
Updating V...
Current V version:
V 0.2.2 2b53992, timestamp: 2021-03-01 21:47:00 +0100
➜ app git:(master)
$ v run app.v
internal_memory:22:626: error: invalid character `\`
here is the code: https://ufile.io/ruh47712
Did some debugging and the error is coming from scanner/scanner.v which I traced back to one of your template files:
<title>@{topics.replace('+', ' ')} jobs - @{app.meta_name}</title>
so I think it's a templating bug.
Here's a minimal POC:
app.v
import vweb
struct App { vweb.Context }
pub fn (mut app App) index() vweb.Result {
x := 'a+b'
return $vweb.html()
}
index.html
@{x.replace('+', ' ')}
Still an issue.
This works as of V 0.4.4 d912268.
import vweb
struct App { vweb.Context }
pub fn (mut app App) index() vweb.Result {
x := 'a+b'
return $vweb.html()
}
fn main() {
app := App{}
vweb.run_at(app, vweb.RunParams{
port: 8081
}) or { panic(err) }
}
@{x.replace('+', ' ')}