commit cc89f1bbd181b555324ccccb43bab833b8743658
parent f6f88f184f5c8121cdaca47e59f838c1082a5e9f
Author: Theo Browne <me@t3.gg>
Date: Fri, 14 Feb 2025 22:31:14 -0800
handle numbers too
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main.ts b/src/main.ts
@@ -56,7 +56,7 @@ function getBangredirectUrl() {
const selectedBang = bangs.find((b) => b.t === bangCandidate) ?? defaultBang;
// Remove the first bang from the query
- const cleanQuery = query.replace(/![a-z]+\s*/i, "").trim();
+ const cleanQuery = query.replace(/![a-z0-9]+\s*/i, "").trim();
// Format of the url is:
// https://www.google.com/search?q={{{s}}}