Tell regexp-util to generate regex compatible with u flag (#16816)

Co-authored-by: fisker Cheung <lionkay@gmail.com>
This commit is contained in:
Tatsunori Uchinoandfisker Cheung authored and GitHub committed 2024-11-04 19:39:31 +08:00
1 parent 6b582a0619
commit dc8df0ab80
3 files changed
+44 -2

No files matched your search

@@ -0,0 +1,19 @@
// This preamble is unnecessary after #16805
const preamble = "a 字 a 字 a 字";
const code = `${preamble}\n${"葛\u{e0100}\n".repeat(3)}${"𠮷\n".repeat(2)}終\n`;
const output = `${preamble}${"葛\u{e0100}".repeat(3)}${"𠮷".repeat(2)}終\n`;
runFormatTest(
{
importMeta: import.meta,
snippets: [
{
code,
name: "Make sure non-BMP CJK characters are treated as CJK",
output,
},
],
},
["markdown"],
{ proseWrap: "never" },
);