If you run document.querySelectorAll(".key, .value") in, e.g., JavaScript, it will return A, x, B, y, but nimquery returns A, B, x, y for it. It is rather hard to emulate the former behaviour for a user of the library (I had to resort to querying all divs and checking their class manually—I was lucky to have so simple query this approach worked without much pain). On the other hand, emulating the latter in JavaScript is no problem: just run two queries and concatenate the results.
I checked the source for some explanatory comment and haven’t find one. exec just does what it does:
Consider this snippet:
If you run
document.querySelectorAll(".key, .value")
in, e.g., JavaScript, it will returnA, x, B, y
, butnimquery
returnsA, B, x, y
for it. It is rather hard to emulate the former behaviour for a user of the library (I had to resort to querying alldiv
s and checking theirclass
manually—I was lucky to have so simple query this approach worked without much pain). On the other hand, emulating the latter in JavaScript is no problem: just run two queries and concatenate the results.I checked the source for some explanatory comment and haven’t find one.
exec
just does what it does:https://github.com/GULPF/nimquery/blob/de705e409e5b67ce8f8af6a6ecb648b8b688b596/nimquery.nim#L847-L848
Could you change the behaviour to match other engines, please? Alternatively, to preserve backward compatibility, a new operator may be introduced.