forked from Shinonome/dots-hyprland
runner: improve math detection
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user