Skip to content

Commit c309228

Browse files
committed
Comments
1 parent 51c3a41 commit c309228

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/recursion-spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,16 @@ describe('recursion', () => {
147147
expect(regex({plugins: [recursion], subclass: true})`(?<d>a)(?R=2)?`.exec('aa')).toHaveSize(2);
148148
});
149149

150-
it('should handle recursion that contains emulation groups', () => {
150+
it('should handle recursion that contains hidden captures', () => {
151151
expect(recursion(r`^((a)\g<1&R=2>?b)$`, {
152152
hiddenCaptures: [2],
153153
})).toEqual({
154154
pattern: '^((a)(?:(a)(?:)?b)?b)$',
155155
captureTransfers: new Map(),
156156
hiddenCaptures: [2, 3],
157157
});
158-
// Atomic groups are handled by Regex+ after external plugins like recursion, so this is
159-
// actually testing Regex+'s ability to preserve and add to emulation groups between plugins
158+
// Atomic groups are handled by Regex+ *after* external plugins like recursion, so this is
159+
// actually testing Regex+'s ability to preserve and add to hidden captures across plugins
160160
expect(regex({plugins: [recursion], subclass: true, disable: {n: true}})`^(((?>a))\g<1&R=2>?b)$`.exec('aabb')).toHaveSize(3);
161161
expect(regex({plugins: [recursion], subclass: true, disable: {n: true}})`^(((?>a)(?>x))\g<1&R=2>?b)$`.exec('axaxbb')).toHaveSize(3);
162162
});

0 commit comments

Comments
 (0)