This repository was archived by the owner on Apr 16, 2024. It is now read-only.

Description
CSS processing fails on selectors like .table > :not(caption) > *, because after removing of pseudos it's transformed into an invalid selector: .table > > *.
Currently I've fixed it by using
matchingElements = query(pseudolessSelector.replace(/(?<=[>+~])\s+(?=[>+~]|$)/g, ' * '));
but it looks like a dirty hack way (e.g. it may corrupt quoted strings in attributes).
The better solution is to check the type of pseudo.prev() in the transformSelector and, if necessary, insert * node (via replaceWith) instead of just remove.