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:
parent
3107618732
commit
cb8a19efaf
@ -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() {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user