readme.rst: fixed a typo and made the snippet runnable
This commit is contained in:
parent
1bbd9c694e
commit
9c8a34e567
1 changed files with 3 additions and 1 deletions
|
|
@ -338,7 +338,7 @@ modules can be used since there is no JS interpreter.
|
|||
const places = @["boston", "cleveland", "los angeles", "new orleans"]
|
||||
|
||||
proc render*(): string =
|
||||
let node = buildHtml(tdiv(class = "mt-3")):
|
||||
let vnode = buildHtml(tdiv(class = "mt-3")):
|
||||
h1: text "My Web Page"
|
||||
p: text "Hello world"
|
||||
ul:
|
||||
|
|
@ -351,3 +351,5 @@ modules can be used since there is no JS interpreter.
|
|||
dt: text "Can I use Karax for server side HTML rendering?"
|
||||
dd: text "Yes"
|
||||
result = $vnode
|
||||
|
||||
echo render()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue