Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Dec 22, 2021
1 parent 92e40dd commit e6ef9a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const regenerate = require('regenerate');
const pattern = String.raw`[[a-h]&&[f-z]]`;

const processedPattern = rewritePattern(pattern, 'v', {
'unicodeSetFlag': 'transform'
'unicodeSetsFlag': 'transform'
});

console.log(processedPattern);
Expand Down
6 changes: 3 additions & 3 deletions tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ describe('character classes', () => {
}
});

const TRANSFORM_U = { unicodeFlag: 'transform', unicodeSetFlag: 'transform' };
const TRANSFORM_U = { unicodeFlag: 'transform', unicodeSetsFlag: 'transform' };

const unicodeSetFixtures = [
{
Expand Down Expand Up @@ -1116,11 +1116,11 @@ const unicodeSetFixtures = [
},
];

describe('unicode set (v) flag', () => {
describe('unicodeSets (v) flag', () => {
for (const fixture of unicodeSetFixtures) {
const pattern = fixture.pattern;
const flags = fixture.flags || 'v';
const options = fixture.options || { unicodeSetFlag: 'transform' };
const options = fixture.options || { unicodeSetsFlag: 'transform' };
const transformUnicodeFlag = options.unicodeFlag === 'transform';
it('rewrites `/' + pattern + '/' + flags + '` correctly ' + (transformUnicodeFlag ? 'without ' : '') + 'using the u flag', () => {
const transpiled = rewritePattern(pattern, flags, options);
Expand Down

0 comments on commit e6ef9a5

Please sign in to comment.