From c12afb15c7da8ca2f1b5b52771f2362048805e11 Mon Sep 17 00:00:00 2001 From: Steven Levithan Date: Thu, 21 Nov 2024 18:11:02 +0100 Subject: [PATCH] Add Unicode marks to default word boundary chars --- src/transform.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transform.js b/src/transform.js index 6121fae..f3025c3 100644 --- a/src/transform.js +++ b/src/transform.js @@ -139,7 +139,7 @@ const FirstPassVisitor = { } else if (kind === AstAssertionKinds.string_end_newline) { replaceWith(parseFragment(r`(?=\n?\z)`)); } else if (kind === AstAssertionKinds.word_boundary && !wordIsAscii) { - const wordChar = r`[\p{L}\p{N}\p{Pc}]`; + const wordChar = r`[\p{L}\p{M}\p{N}\p{Pc}]`; const b = `(?:(?<=${wordChar})(?!${wordChar})|(?