summary refs log tree commit diff stats
path: root/lib/pure/htmlgen.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-04-23 17:32:02 +0200
committerAraq <rumpf_a@web.de>2013-04-23 17:32:02 +0200
commit171155a12dcb08d9557b7099efae54bebd1d19f1 (patch)
tree8b521a2a275da78a8d19692d5e6759863ad8cce7 /lib/pure/htmlgen.nim
parentb0b0b8fcfb0f7551b06008df997e2b9257e84c29 (diff)
downloadNim-171155a12dcb08d9557b7099efae54bebd1d19f1.tar.gz
fixes #393; now works with backticks
Diffstat (limited to 'lib/pure/htmlgen.nim')
-rw-r--r--lib/pure/htmlgen.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pure/htmlgen.nim b/lib/pure/htmlgen.nim
index 75af2c892..8d90f8589 100644
--- a/lib/pure/htmlgen.nim
+++ b/lib/pure/htmlgen.nim
@@ -34,7 +34,10 @@ const
 proc getIdent(e: PNimrodNode): string {.compileTime.} = 
   case e.kind
   of nnkIdent: result = normalize($e.ident)
-  of nnkAccQuoted: result = getIdent(e[0])
+  of nnkAccQuoted: 
+    result = getIdent(e[0])
+    for i in 1 .. e.len-1:
+      result.add getIdent(e[i])
   else: error("cannot extract identifier from node: " & toStrLit(e).strVal)
 
 proc delete[T](s: var seq[T], attr: T): bool = 
@@ -478,4 +481,5 @@ macro `var`*(e: expr): expr {.immediate.} =
 when isMainModule:
   var nim = "Nimrod"
   echo h1(a(href="http://nimrod-code.org", nim))
+  echo form(action="test", `accept-charset` = "Content-Type")