Skip to content

Commit

Permalink
v0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
slevithan committed Dec 21, 2024
1 parent 06c9d85 commit dbc23b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ Using default `accuracy` adds support for the following features, depending on `

*Default: `false`.*

Disables advanced emulation that relies on returning a `RegExp` subclass, resulting in certain patterns not being emulatable.
Disables advanced emulation that relies on returning a `RegExp` subclass. In cases when a subclass would otherwise have been used, this results in one of the following:

- An error is thrown for certain patterns that are not emulatable without a subclass.
- When the regex can still be emulated accurately, *subpattern* match details (accessed via properties of match objects returned when using the regex) might differ from Oniguruma.

### `flags`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oniguruma-to-es",
"version": "0.8.0",
"version": "0.8.1",
"description": "Convert Oniguruma patterns to native JavaScript RegExp",
"author": "Steven Levithan",
"license": "MIT",
Expand Down
1 change: 1 addition & 0 deletions scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ async function onigurumaExec(pattern, str, pos = 0) {
return null;
}

// Uncomment to see subpattern match details
// for (const obj of match.captureIndices) {
// obj.match = str.slice(obj.start, obj.end);
// }
Expand Down

0 comments on commit dbc23b4

Please sign in to comment.