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);
|
execAsync(command).catch(print);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function startsWithNumber(str) {
|
export function couldBeMath(str) {
|
||||||
var pattern = /^\d/;
|
const regex = /^[0-9.+*/-]/;
|
||||||
return pattern.test(str);
|
return regex.test(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function expandTilde(path) {
|
export function expandTilde(path) {
|
||||||
|
|||||||
Reference in New Issue
Block a user