technosophos/querypath — Issue #65: Adjacent sibling selector not working as expected
Author: fiveminuteargument
Created: 2011-12-22 11:00:03+00:00
State: open

The adjacent sibling selector appears not to work when text nodes exist in between elements. For example:

```html

title

Lorem ipsum dolor sit amet.

```
```php
count(qp($html)->find('h1 + *'))
```

returns 0, but

```html

title

Lorem ipsum dolor sit amet.

```

```php
count(qp($html)->find('h1 + *'))
```

returns 1. This is also the case if the htmlqp() function is used instead of qp().