Skip to content

Commit

Permalink
Improve error for invalid Onig syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
slevithan committed Nov 22, 2024
1 parent d74c76e commit 107e661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tokenize.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit 107e661

Please sign in to comment.