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

vweb: bring back html() test

This commit is contained in:
Alexander Medvednikov 2019-11-26 09:34:04 +03:00
parent 3107618732
commit cb8a19efaf
2 changed files with 2 additions and 4 deletions

View File

@ -26,16 +26,14 @@ pub fn (app & App) json_endpoint() {
app.vweb.json('{"a": 3}')
}
/*
pub fn (app mut App) index() {
app.cnt ++
$vweb.html()
}
*/
pub fn (app & App) text() {
app.vweb.text('hello world')
app.vweb.text('Hello world')
}
pub fn (app mut App) cookie() {

View File

@ -172,7 +172,7 @@ fn (p mut Parser) comp_time() {
p.statements_from_text(v_code, false)
p.genln('/////////////////// tmpl end')
receiver := p.cur_fn.args[0]
dot := if receiver.is_mut || receiver.ptr { '->' } else { '.' }
dot := if receiver.is_mut || receiver.ptr || receiver.typ.ends_with('*') { '->' } else { '.' }
p.genln('vweb__Context_html($receiver.name /*!*/$dot vweb, tmpl_res)')
}
else {