Skip to content

Commit

Permalink
Add new cosmetic procedural operator: :nth-ancestor(n)
Browse files Browse the repository at this point in the history
The purpose of this new `:nth-ancestor(n)` operator is to
lookup the nth ancestor relative to the currently selected
node.

It is essentially equivalent to `:xpath(..)`, where
ancestor distance is expressed as a number rather than a
sequence of slash-separated `..`.

The rationale to introduce this new procedural selector
is to have a low overhead way to accomplish ancestor
selection.
  • Loading branch information
gorhill committed Apr 30, 2019
1 parent 42bf659 commit 73e2f25
Show file tree
Hide file tree
Showing 2 changed files with 227 additions and 179 deletions.
Loading

0 comments on commit 73e2f25

Please sign in to comment.