diff options
author | RaindropsSys <raindrops@equestria.dev> | 2024-06-24 15:17:24 +0200 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2024-06-24 15:17:24 +0200 |
commit | 1c94bd658c2469f9ca9f465db82e71b6f7d2bfe8 (patch) | |
tree | 5d15aa75b903edb160cd8a49726b8ec339c645e9 /updater | |
parent | ae3e3ceefc8e3c174ff69f05212d636230f093d6 (diff) | |
download | faunerie-1c94bd658c2469f9ca9f465db82e71b6f7d2bfe8.tar.gz faunerie-1c94bd658c2469f9ca9f465db82e71b6f7d2bfe8.tar.bz2 faunerie-1c94bd658c2469f9ca9f465db82e71b6f7d2bfe8.zip |
Fix regex performance
Diffstat (limited to 'updater')
-rwxr-xr-x | updater/main.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/updater/main.js b/updater/main.js index d70bd51..15ca4dc 100755 --- a/updater/main.js +++ b/updater/main.js @@ -48,7 +48,7 @@ app.whenReady().then(() => { let lines = d.trim().split("\n"); let line = lines[lines.length - 1]; - let lineProcessed = line.replace(/^(\d+) (\d|.)+M .*$/gm, "$1").trim(); + let lineProcessed = line.replace(/^(\d+) (\d|\.)+M .*$/gm, "$1").trim(); if (lineProcessed !== line && !isNaN(parseInt(lineProcessed))) { percent = lineProcessed; } @@ -78,7 +78,7 @@ app.whenReady().then(() => { let lines = d.trim().split("\n"); let line = lines[lines.length - 1]; - let lineProcessed = line.replace(/^(\d+) (\d|.)+M .*$/gm, "$1").trim(); + let lineProcessed = line.replace(/^(\d+) (\d|\.)+M .*$/gm, "$1").trim(); if (lineProcessed !== line && !isNaN(parseInt(lineProcessed))) { percent = lineProcessed; } |