summary refs log tree commit diff stats
path: root/lib/pure/htmlgen.nim
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2018-04-11 16:48:01 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-04-11 16:48:01 +0200
commit6baca58693672f8fc9485272b3c350d0b0b77163 (patch)
tree5ad6d7a2aa366aee07f8991bce55b410f4a48e90 /lib/pure/htmlgen.nim
parent1ee5f1e36afd31f733195b13e638354ec9412948 (diff)
downloadNim-6baca58693672f8fc9485272b3c350d0b0b77163.tar.gz
Get symbol kind (#7491)
Diffstat (limited to 'lib/pure/htmlgen.nim')
-rw-r--r--lib/pure/htmlgen.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pure/htmlgen.nim b/lib/pure/htmlgen.nim
index c0934a45b..e7562029a 100644
--- a/lib/pure/htmlgen.nim
+++ b/lib/pure/htmlgen.nim
@@ -92,8 +92,10 @@ proc xmlCheckedTag*(e: NimNode, tag: string, optAttr = "", reqAttr = "",
     result.add(newStrLitNode("</"))
     result.add(newStrLitNode(tag))
     result.add(newStrLitNode(">"))
-  result = nestList(!"&", result)
-
+  when compiles(nestList(ident"&", result)):
+    result = nestList(ident"&", result)
+  else:
+    result = nestList(!"&", result)
 
 macro a*(e: varargs[untyped]): untyped =
   ## generates the HTML ``a`` element.