mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-03-13 16:58:33 +08:00
Fix incorrect molang error on ternary expression
This commit is contained in:
parent
206f674756
commit
4f0114c7eb
@ -597,8 +597,8 @@ new ValidatorCheck('molang_syntax', {
|
|||||||
if (clear_string.match(/(^|[^a-z0-9_])[\d.]+[a-z_]+/i)) {
|
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, ''));
|
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+\-*/().,;[\]!?=<>&|]/)) {
|
if (clear_string.match(/[^\w\s+\-*/().,;:[\]!?=<>&|]/)) {
|
||||||
issues.push('Invalid character: ' + clear_string.match(/[^\w+\-*/().,;[\]!?=<>&|]+/g).join(', '));
|
issues.push('Invalid character: ' + clear_string.match(/[^\w+\-*/().,;:[\]!?=<>&|]+/g).join(', '));
|
||||||
}
|
}
|
||||||
let left = string.match(/\(/g) || 0;
|
let left = string.match(/\(/g) || 0;
|
||||||
let right = string.match(/\)/g) || 0;
|
let right = string.match(/\)/g) || 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user