Skip to content

Commit 66af839

Browse files
authored
Merge pull request #3 from skellock/nim-19
supports nim 0.19 and latest devel
2 parents 0ea6b3f + b515188 commit 66af839

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

q.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ let
2121
attribute = r"[a-zA-Z][a-zA-Z0-9_\-]*"
2222
classes = r"{\.[a-zA-Z0-9_][a-zA-Z0-9_\-]*}"
2323
attributes = r"{\[" & attribute & r"\s*([\*\^\$\~]?\=\s*[\'""]?(\s*\ident\s*)+[\'""]?)?\]}"
24-
pselectors = peg(r"\s*{\ident}?({'#'\ident})? (" & classes & ")* "& attributes & "*")
24+
pselectors = peg(r"\s*{\ident}?({'#'\ident})? (" & classes & ")* " & attributes & "*")
2525
pattributes = peg(r"{\[{" & attribute & r"}\s*({[\*\^\$\~]?}\=\s*[\'""]?{(\s*\ident\s*)+}[\'""]?)?\]}")
2626

2727
type
@@ -174,7 +174,7 @@ proc parseSelector(token: string): Selector =
174174
# Type selector
175175
elif token =~ pselectors:
176176
for i in 0..matches.len-1:
177-
if matches[i].isNil:
177+
if matches[i].len == 0:
178178
continue
179179

180180
let ch = matches[i][0]

0 commit comments

Comments
 (0)