diff --git a/biome.json b/biome.json index bee01bd683..49446f9ac5 100644 --- a/biome.json +++ b/biome.json @@ -41,7 +41,6 @@ }, "suspicious": { "noAssignInExpressions": "off", - "noControlCharactersInRegex": "off", "noDoubleEquals": "off", "noFallthroughSwitchClause": "off", "noRedeclare": "off", diff --git a/runtime/mlBytes.js b/runtime/mlBytes.js index 577616952d..5f226025a1 100644 --- a/runtime/mlBytes.js +++ b/runtime/mlBytes.js @@ -194,7 +194,9 @@ function jsoo_is_ascii(s) { // Spidermonkey gets much slower when s.length >= 24 (on 64 bit archs) for (var i = 0; i < s.length; i++) if (s.charCodeAt(i) > 127) return false; return true; - } else return !/[^\x00-\x7f]/.test(s); + } + // biome-ignore lint/suspicious/noControlCharactersInRegex: expected + else return !/[^\x00-\x7f]/.test(s); } //Provides: caml_bytes_unsafe_get mutable @@ -907,6 +909,7 @@ function caml_ml_bytes_content(s) { //Requires: jsoo_is_ascii //If: js-string function caml_is_ml_string(s) { + // biome-ignore lint/suspicious/noControlCharactersInRegex: expected return typeof s === "string" && !/[^\x00-\xff]/.test(s); }