fixes #393; now works with backticks
This commit is contained in:
parent
b0b0b8fcfb
commit
171155a12d
1 changed files with 5 additions and 1 deletions
|
|
@ -34,7 +34,10 @@ const
|
||||||
proc getIdent(e: PNimrodNode): string {.compileTime.} =
|
proc getIdent(e: PNimrodNode): string {.compileTime.} =
|
||||||
case e.kind
|
case e.kind
|
||||||
of nnkIdent: result = normalize($e.ident)
|
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)
|
else: error("cannot extract identifier from node: " & toStrLit(e).strVal)
|
||||||
|
|
||||||
proc delete[T](s: var seq[T], attr: T): bool =
|
proc delete[T](s: var seq[T], attr: T): bool =
|
||||||
|
|
@ -478,4 +481,5 @@ macro `var`*(e: expr): expr {.immediate.} =
|
||||||
when isMainModule:
|
when isMainModule:
|
||||||
var nim = "Nimrod"
|
var nim = "Nimrod"
|
||||||
echo h1(a(href="http://nimrod-code.org", nim))
|
echo h1(a(href="http://nimrod-code.org", nim))
|
||||||
|
echo form(action="test", `accept-charset` = "Content-Type")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue