Skip to content

Commit a0dafa6

Browse files
committed
skip escaping regex for ripgrep
1 parent b55c9a5 commit a0dafa6

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

core/util/regexValidator.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,6 @@ export function prepareQueryForRipgrep(query: string): {
150150
query: string;
151151
warning?: string;
152152
} {
153-
// Check if it looks like a literal search that should be escaped
154-
if (looksLikeLiteralSearch(query)) {
155-
return {
156-
query: escapeLiteralForRegex(query),
157-
warning:
158-
"Query contained special regex characters and was escaped for literal text search",
159-
};
160-
}
161-
162-
// Otherwise validate and sanitize as regex
163153
const validation = validateAndSanitizeRegex(query);
164154

165155
return {

0 commit comments

Comments
 (0)