From 02039dfbaef94486ceb6e5ef66f670033d8aef85 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Thu, 26 Sep 2024 12:06:20 +0200 Subject: [PATCH] Misc: lint comment --- biome.json | 1 - runtime/mlBytes.js | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) 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); }