We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8b70fa commit 0ea6b3fCopy full SHA for 0ea6b3f
q.nim
@@ -99,11 +99,10 @@ proc match(n: XmlNode, s: Selector): bool =
99
if result and s.attributes.len > 0:
100
for attr in s.attributes:
101
let value = n.attr(attr.name)
102
-
103
case attr.operator
104
of '\0':
105
if attr.value.len == 0: # [attr] match all node has specified attribute, dont care about the value
106
- result = n.attrs.hasKey(attr.name)
+ result = n.attr(attr.name).len > 0
107
else: # [attr=value] value must match
108
result = attr.value == value
109
of '^':
q.nimble
@@ -1,6 +1,6 @@
1
[Package]
2
name = "q"
3
-version = "0.0.5"
+version = "0.0.6"
4
author = "Huy Doan"
5
description = "Simple CSS3 selectors for Nim"
6
license = "MIT"
0 commit comments