From 107e6613288697b70a63d071d865526cb0707e2a Mon Sep 17 00:00:00 2001 From: Steven Levithan Date: Fri, 22 Nov 2024 15:38:10 +0100 Subject: [PATCH] Improve error for invalid Onig syntax --- src/tokenize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tokenize.js b/src/tokenize.js index e27683f..56340bd 100644 --- a/src/tokenize.js +++ b/src/tokenize.js @@ -512,7 +512,7 @@ function createTokenForSharedEscape(raw, {inCharClass}) { }); return tokens; } catch { - throw new Error(`Too short or invalid multibyte code "${raw}"`); + throw new Error(`Multibyte code "${raw}" incomplete or invalid in Oniguruma`); } } if (char1 === 'u' || char1 === 'x') {