Releases: slevithan/regex
Releases · slevithan/regex
v4.3.3
🚀 Features
- When an invalid regex throws, always include the generated source and flags in the error message (some browsers automatically include them, but Firefox and Safari don't).
🐞 Fixes
- Convert numbers interpolated in enclosed
\u{…}
to hexadecimal. In other words, although interpolating a string likeregex`\u{${'160'}}`
returns/\u{160}/
, interpolating the numberregex`\u{${160}}`
in this context returns/\u{A0}/
. (#24, @graphemecluster)
v4.3.2
v4.3.1
v4.3.0
v4.2.1
v4.2.0
🚀 Features
- Added function
processRegex
, which returns an object withexpression
andflags
strings.- Warning: This feature is experimental and may change without following semver.
🐞 Fixes
- When using emulated flag x, if flag v is disabled or unsupported and
unicodeSetsPlugin
is explicitly set tonull
, allow whitespace-separated, unescaped (literal) hyphens on the end of character class ranges.
v4.1.3
v4.1.2
🚀 Features
- Added a CommonJS bundle. (#18, @subtleGradient)
- Added sourcemaps for all bundles. (#18, @subtleGradient)
v4.1.1
🚀 Features
- Combining atomic/possessive syntax with subroutines previously resulted in subroutines using capturing wrappers. This is now avoided when the regex doesn’t use backreferences, resulting in faster-running generated regex source.
- Possessive fixed repetition quantifiers (e.g.
{2}+
) are now converted to greedy quantifiers (e.g.{2}
), which gives the same behavior with faster-running generated regex source.
🐞 Fixes
- When using extended syntax (e.g. atomic groups) that resulted in the use of emulation groups in generated source, the
subclass: true
option could lead to incorrect values for submatches that preceded emulation groups, when used outside of the regex.