From 29d19cf2589fd8410098bbbcecabfdd299750e44 Mon Sep 17 00:00:00 2001 From: peppidesu Date: Sun, 1 Feb 2026 11:43:52 +0100 Subject: [PATCH] fix: version check regex --- src/consts.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/consts.js b/src/consts.js index 8ea4b8b..e8ed461 100644 --- a/src/consts.js +++ b/src/consts.js @@ -5,5 +5,9 @@ export const NON_ELEMENT_ITEMS = 100; export const APWORLD_VERSIONS = ["0.3.x", "1.x.x"]; export const APWORLD_VERSION_REGEX = new RegExp( - APWORLD_VERSIONS.map((s) => `^(${s.replace("x", "\\d+")}-?.*)`).join("|"), + "^(" + + APWORLD_VERSIONS.map((s) => `(${s.replaceAll("x", "\\d+").replaceAll(".", "\\.")})`).join( + "|", + ) + + ")(-.*)?$", );