Skip to content

Commit 8ab6325

Browse files
committed
v2.1.0
1 parent 2b80e4f commit 8ab6325

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "regex",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "Context-aware regex template tag with advanced features and best practices built-in",
55
"author": "Steven Levithan",
66
"license": "MIT",

src/index.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// regex 2.0.0; Steven Levithan; MIT License
2-
31
import {Context, hasUnescaped, replaceUnescaped} from 'regex-utilities';
42
import {CharClassContext, RegexContext, adjustNumberedBackrefs, containsCharClassUnion, countCaptures, escapeV, flagVSupported, getBreakoutChar, getEndContextForIncompletePattern, patternModsSupported, preprocess, sandboxLoneCharClassCaret, sandboxLoneDoublePunctuatorChar, sandboxUnsafeNulls} from './utils.js';
53
import {flagNPreprocessor} from './flag-n.js';
@@ -12,8 +10,9 @@ import {backcompatPostprocessor} from './backcompat.js';
1210
/**
1311
@typedef {Object} RegexTagOptions
1412
@prop {string} [flags]
15-
@prop {Array<(pattern: string) => string>} [postprocessors]
13+
@prop {Array<(pattern: string, flags: string) => string>} [postprocessors]
1614
@prop {boolean} [__flagN]
15+
@prop {boolean} [__flagV]
1716
@prop {boolean} [__flagX]
1817
@prop {boolean} [__rake]
1918
*/
@@ -63,8 +62,8 @@ function fromTemplate(constructor, options, template, ...values) {
6362
flags = '',
6463
postprocessors = [],
6564
__flagN = true,
66-
__flagX = true,
6765
__flagV = flagVSupported,
66+
__flagX = true,
6867
__rake = true,
6968
} = options;
7069
if (/[vu]/.test(flags)) {

0 commit comments

Comments
 (0)