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}')
|
app.vweb.json('{"a": 3}')
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
pub fn (app mut App) index() {
|
pub fn (app mut App) index() {
|
||||||
app.cnt ++
|
app.cnt ++
|
||||||
|
|
||||||
$vweb.html()
|
$vweb.html()
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
pub fn (app & App) text() {
|
pub fn (app & App) text() {
|
||||||
app.vweb.text('hello world')
|
app.vweb.text('Hello world')
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (app mut App) cookie() {
|
pub fn (app mut App) cookie() {
|
||||||
|
@ -172,7 +172,7 @@ fn (p mut Parser) comp_time() {
|
|||||||
p.statements_from_text(v_code, false)
|
p.statements_from_text(v_code, false)
|
||||||
p.genln('/////////////////// tmpl end')
|
p.genln('/////////////////// tmpl end')
|
||||||
receiver := p.cur_fn.args[0]
|
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)')
|
p.genln('vweb__Context_html($receiver.name /*!*/$dot vweb, tmpl_res)')
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user