Skip to content

Commit

Permalink
added child xPath selector
Browse files Browse the repository at this point in the history
  • Loading branch information
scorninpc committed Jun 23, 2023
1 parent 9ef90f0 commit d56fe1c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/voku/helper/SelectorConverter.php
Expand Up @@ -46,6 +46,10 @@ public static function toXPath(string $selector, bool $ignoreCssSelectorErrors =
return $selector;
}

if (\strpos($selector, 'child::') === 0) {
return $selector;

Check warning on line 50 in src/voku/helper/SelectorConverter.php

View check run for this annotation

Codecov / codecov/patch

src/voku/helper/SelectorConverter.php#L50

Added line #L50 was not covered by tests
}

if (!\class_exists(CssSelectorConverter::class)) {
throw new \RuntimeException('Unable to filter with a CSS selector as the Symfony CssSelector 2.8+ is not installed (you can use filterXPath instead).');
}
Expand Down

0 comments on commit d56fe1c

Please sign in to comment.