Skip to content

Commit

Permalink
fix(karaxnim#200): use template element for verbatim (karaxnim#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
daylinmorgan committed Aug 28, 2024
1 parent a1a97ec commit 103e836
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions karax/karax.nim
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,9 @@ proc toDom*(n: VNode; useAttachedNode: bool; kxi: KaraxInstance = nil): Node =
result = document.createTextNode(n.text)
attach n
elif n.kind == VNodeKind.verbatim:
result = document.createElement("div")
result.innerHTML = n.text
var t = document.createElement("template")
t.innerHTML = n.text
result = t.content
attach n
return result
elif n.kind == VNodeKind.vthunk:
Expand Down

0 comments on commit 103e836

Please sign in to comment.