aboutsummaryrefslogtreecommitdiff
path: root/src/main.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.ts')
-rw-r--r--src/main.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.ts b/src/main.ts
index c6e00af..7b81419 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -55,13 +55,13 @@ function getBangredirectUrl() {
return null;
}
- const match = query.match(/!([a-z0-9]+)/i);
+ const match = query.match(/!(\S+)/i);
const bangCandidate = match?.[1]?.toLowerCase();
const selectedBang = bangs.find((b) => b.t === bangCandidate) ?? defaultBang;
// Remove the first bang from the query
- const cleanQuery = query.replace(/![a-z0-9]+\s*/i, "").trim();
+ const cleanQuery = query.replace(/!\S+\s*/i, "").trim();
// Format of the url is:
// https://www.google.com/search?q={{{s}}}