Discovered by zig-utils/zig-js#213.
With .unicode = true, . currently uses the byte-NFA code-point automaton and accepts a WTF-8 encoded high surrogate as a complete one-unit match. ECMAScript Unicode matching must combine an adjacent high/low surrogate pair and consume both UTF-16 code units atomically.
Acceptance criteria:
Discovered by zig-utils/zig-js#213.
With
.unicode = true,.currently uses the byte-NFA code-point automaton and accepts a WTF-8 encoded high surrogate as a complete one-unit match. ECMAScript Unicode matching must combine an adjacent high/low surrogate pair and consume both UTF-16 code units atomically.Acceptance criteria:
.consumes a WTF-8 high/low surrogate pair as one match..continues consuming only one surrogate code unit..continues matching normal UTF-8 scalar input and respecting dot-all/line terminators.