Releases: slevithan/oniguruma-to-es
Releases · slevithan/oniguruma-to-es
v0.9.0
- Rename option
allowUnhandledGAnchors
asignoreUnsupportedGAnchors
. - Externalize dependencies for the ESM bundle. (#12, @bluwy)
- Keep duplicate group names on the first instance (rather than last) to match Oniguruma's match results in cases affected by subroutines or duplicate group names.
- When not using option
avoidSubclass
:- Hide subpattern details for captures created by emulated subroutines from match results.
- Transfer subroutine (and descendent) capture details on match results to the indexes of groups they reference (if preceding) to match Oniguruma's subpattern match results/ordering.
- Don't restrict Unicode properties based on
target
. (#10)
v0.8.1
- Fix: When the following conditions were all met, the
indices
values of result arrays could be incorrect: (1) optionshasIndices
andglobal
both enabled, (2) the pattern included(^|\G)
or similar, and (3) the generated regex was used while itslastIndex
was greater than 0.
v0.8.0
- Added option
rules.captureGroup
(equivalent to Oniguruma compile-time optionONIG_OPTION_CAPTURE_GROUP
) totoDetails
,toRegExp
, andtoOnigurumaAst
. Allows unnamed captures and numbered backreferences/subroutines when using named capture (with complex resulting rules in edge cases). - When using option
allowUnhandledGAnchors
, don't add flagy
for unsupported\G
(provides better tradeoffs). - When not using option
avoidSubclass
, use emulation groups (which prevent captured values from appearing on the result array) for copies of capturing groups created by recursion. - Fix: Prevent
^
from matching after a string-terminating line feed. (#9)
v0.7.0
v0.6.1
v0.6.0
- Added support for flags
D
(Digit is ASCII) andS
(Space is ASCII) at top-level. - Added option
rules.asciiWordBoundaries
. - Replaced option
accuracy: 'loose'
withrules.allowUnhandledGAnchors
. - Replaced option
tmGrammar
withrules.allowOrphanBackrefs
. - Fix:
\w
,\d
,\s
, and their inversions are Unicode-based by default. (#4) - Fix: Unicode combining marks qualify as
\b
word boundaries by default. - Fix: In edge cases, using nested character classes that combined union and intersection led to invalid patterns.
- Fix: In edge cases, some characters were not escaped appropriately in nested character classes.
v0.5.0
v0.4.1
v0.4.0
- Uses
EmulatedRegExp
(unlessavoidSubclass
is enabled) for patterns with atomic groups or possessive quantifiers. EmulatedRegExp
automatically adjusts subpattern matches and indices to account for injected emulation groups.- Added
target
option'auto'
(hat-tip @antfu for idea). - Improved
\G
support so it works with additional patterns. - Changed the shape of
toDetails
results when subclass details are included. - Renamed the types used for options objects.
- Added missing Unicode case folding for Latin small long s
ſ
U+017F.