Skip to content

Commit

Permalink
fix(karaxnim#200): use template element for verbatim
Browse files Browse the repository at this point in the history
  • Loading branch information
daylinmorgan committed Oct 6, 2023
1 parent abbeb7b commit 7d51ae2
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 @@ -167,8 +167,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 7d51ae2

Please sign in to comment.