You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect that InterfaceDeclaration > :nth-child(1) to match only one node (since any node cannot have more than one child that is the first one) but is matching 3 nodes. The same happens with all :first-child, :last-child, etc.
Another example, in the code:
functionf(){vara=1functiong(){vara=1}}
This selector SourceFile>FunctionDeclaration:has([name="f"])>Block>*>*>*>*>VariableDeclaration matches only one child as expected, but this one (just replace VariableDeclaration with :first-child) matches 2 nodes.
It's like whenever you use :first-child or cia, the previous '>' (direct child ) is not taking in account and replaced by " " (ancestor)
I would like to know if this is the expected behavior and if not if you would accept a PR for this (supposing is simple to fix) ?