xpath: Fix nesting predicates (#1158)

we need to use `.//` instead of `//` inside the predicate
This commit is contained in:
Anton Pozhidaev 2020-08-03 15:34:28 +03:00 committed by GitHub
parent 269c709c61
commit b407143e5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -234,7 +234,7 @@ Order is significant, these two are different.
### Nesting predicates
```
//section[//h1[@id='hi']]
//section[.//h1[@id='hi']]
```
This returns `<section>` if it has an `<h1>` descendant with `id='hi'`.