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 authored and hawkeye116477 committed Jun 29, 2020
1 parent d7213bb commit 4dccbfd
Show file tree
Hide file tree
Showing 2 changed files with 228 additions and 180 deletions.
Loading

0 comments on commit 4dccbfd

Please sign in to comment.