From dad514147241b6f1d63c73637eb4d89a656d6e67 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 22 Jan 2024 16:27:47 +0700 Subject: [PATCH] runner: improve math detection --- .config/ags/widgets/overview/miscfunctions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/ags/widgets/overview/miscfunctions.js b/.config/ags/widgets/overview/miscfunctions.js index 42e2572f..2ca0bf95 100644 --- a/.config/ags/widgets/overview/miscfunctions.js +++ b/.config/ags/widgets/overview/miscfunctions.js @@ -66,9 +66,9 @@ export function execAndClose(command, terminal) { execAsync(command).catch(print); } -export function startsWithNumber(str) { - var pattern = /^\d/; - return pattern.test(str); +export function couldBeMath(str) { + const regex = /^[0-9.+*/-]/; + return regex.test(str); } export function expandTilde(path) {