We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9552d63 commit 2eede1cCopy full SHA for 2eede1c
src/main/java/io/github/treesitter/jtreesitter/QueryPredicate.java
@@ -125,7 +125,7 @@ boolean test(QueryMatch match) {
125
if (findNodes1.isEmpty()) return !isPositive;
126
Predicate<Node> predicate = node -> {
127
var text = Objects.requireNonNull(node.getText());
128
- return pattern.matcher(text).hasMatch() == isPositive;
+ return pattern.matcher(text).find() == isPositive;
129
};
130
if (!isAny) return findNodes1.stream().allMatch(predicate);
131
return findNodes1.stream().anyMatch(predicate);
0 commit comments