Skip to content

Commit f9172c7

Browse files
committed
fix calling macro in html tree
Signed-off-by: George Lemon <georgelemon@protonmail.com>
1 parent bf92225 commit f9172c7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/tim/engine/codegen.nim

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1505,9 +1505,16 @@ proc htmlConstr(node: Node): Sym {.codegen.} =
15051505
of nkBool, nkInt, nkFloat, nkString:
15061506
discard gen.pushConst(subNode)
15071507
gen.chunk.emit(opcTextHtml)
1508-
of nkIdent, nkCall, nkDot, nkInfix:
1508+
of nkIdent, nkDot, nkInfix:
15091509
discard gen.genExpr(subNode)
15101510
gen.chunk.emit(opcTextHtml)
1511+
of nkCall:
1512+
if subNode[0].ident[0] == '@':
1513+
gen.chunk.emit(opcInnerHtml)
1514+
gen.genStmt(subNode)
1515+
else:
1516+
discard gen.genExpr(subNode)
1517+
gen.chunk.emit(opcTextHtml)
15111518
else:
15121519
gen.chunk.emit(opcInnerHtml)
15131520
gen.genStmt(subNode)

0 commit comments

Comments
 (0)