aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaindropsSys <raindrops@equestria.dev>2024-06-24 15:17:24 +0200
committerRaindropsSys <raindrops@equestria.dev>2024-06-24 15:17:24 +0200
commit1c94bd658c2469f9ca9f465db82e71b6f7d2bfe8 (patch)
tree5d15aa75b903edb160cd8a49726b8ec339c645e9
parentae3e3ceefc8e3c174ff69f05212d636230f093d6 (diff)
downloadfaunerie-1c94bd658c2469f9ca9f465db82e71b6f7d2bfe8.tar.gz
faunerie-1c94bd658c2469f9ca9f465db82e71b6f7d2bfe8.tar.bz2
faunerie-1c94bd658c2469f9ca9f465db82e71b6f7d2bfe8.zip
Fix regex performance
-rwxr-xr-xupdater/main.js4
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;
}