From 4f0114c7ebdf65dad887430d917ac1d41b6378e9 Mon Sep 17 00:00:00 2001 From: JannisX11 Date: Thu, 5 Jan 2023 21:47:13 +0100 Subject: [PATCH] Fix incorrect molang error on ternary expression --- js/animations/molang.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/animations/molang.js b/js/animations/molang.js index de319473..63ffcb8d 100644 --- a/js/animations/molang.js +++ b/js/animations/molang.js @@ -597,8 +597,8 @@ new ValidatorCheck('molang_syntax', { if (clear_string.match(/(^|[^a-z0-9_])[\d.]+[a-z_]+/i)) { issues.push('Invalid token ' + clear_string.match(/(^|[^a-z0-9_])[\d.]+[a-z_]+/i)[0].replace(/[^a-z0-9._]/g, '')); } - if (clear_string.match(/[^\w\s+\-*/().,;[\]!?=<>&|]/)) { - issues.push('Invalid character: ' + clear_string.match(/[^\w+\-*/().,;[\]!?=<>&|]+/g).join(', ')); + if (clear_string.match(/[^\w\s+\-*/().,;:[\]!?=<>&|]/)) { + issues.push('Invalid character: ' + clear_string.match(/[^\w+\-*/().,;:[\]!?=<>&|]+/g).join(', ')); } let left = string.match(/\(/g) || 0; let right = string.match(/\)/g) || 0;