Closed
Description
When using htmlgen and using any data- attribute I get a compile error.
Example
import htmlgen
td(data-label ="foobar")
Current Output
Typemismatch error
Possible Solution
In htmlgen.nim change the proc delete
to check for data attributes like this:
proc delete[T](s: var seq[T], attr: T): bool =
# data-* attributes are user defined, so it would not make sense to
# define each single one statically.
if attr.startsWith("data-"):
return true
var idx = find(s, attr)
if idx >= 0:
var L = s.len
s[idx] = s[L-1]
setLen(s, L-1)
result = true
$ nim -v
Nim Compiler Version 1.0.6
Metadata
Metadata
Assignees
Labels
No labels