diff --git a/src/transform.js b/src/transform.js index f3025c3..9473f14 100644 --- a/src/transform.js +++ b/src/transform.js @@ -3,7 +3,7 @@ import {AstAssertionKinds, AstCharacterSetKinds, AstDirectiveKinds, AstTypes, As import {applySubclassStrategies, isLoneGLookaround} from './subclass.js'; import {tokenize} from './tokenize.js'; import {traverse} from './traverse.js'; -import {JsUnicodeProperties, PosixClassesMap} from './unicode.js'; +import {defaultWordChar, JsUnicodeProperties, PosixClassesMap} from './unicode.js'; import {cp, getNewCurrentFlags, getOrCreate, isMinTarget, r} from './utils.js'; import {isLookaround, isZeroLengthNode} from './utils-node.js'; import emojiRegex from 'emoji-regex-xs'; @@ -139,9 +139,8 @@ 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{M}\p{N}\p{Pc}]`; - const b = `(?:(?<=${wordChar})(?!${wordChar})|(?