Skip to content

Commit

Permalink
Readme tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
slevithan committed Jan 21, 2025
1 parent 9789dc6 commit a6cb180
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ The table above doesn't include all aspects that Oniguruma-To-ES emulates (inclu
3. Target `ES2018` doesn't support nested *negated* character classes.
4. It's not an error for *numbered* backreferences to come before their referenced group in Oniguruma, but an error is the best path for Oniguruma-To-ES because ① most placements are mistakes and can never match (based on the Oniguruma behavior for backreferences to nonparticipating groups), ② erroring matches the behavior of named backreferences, and ③ the edge cases where they're matchable rely on rules for backreference resetting within quantified groups that are different in JavaScript and aren't emulatable. Note that it's not a backreference in the first place if using `\10` or higher and not as many capturing groups are defined to the left (it's an octal or identity escape).
5. Oniguruma's recursion depth limit is `20`. Oniguruma-To-ES uses the same limit by default but allows customizing it via the `rules.recursionLimit` option. Two rare uses of recursion aren't yet supported: overlapping recursions, and use of backreferences when a recursed subpattern contains captures. Patterns that would trigger an infinite recursion error in Oniguruma might find a match in Oniguruma-To-ES (since recursion is bounded), but future versions will detect this and error at transpilation time.
6. Exotic (and extremely rare) forms of absent functions that start with `(?~|` (absent expressions, stoppers, and clearers) aren't yet supported. Also note that Oniguruma's absent functions have different behavior than Onigmo.
6. Other absent function types (which start with `(?~|` and are extremely rare) aren't yet supported. Note that absent functions behave differently in Oniguruma and Onigmo.

## ❌ Unsupported features

Expand All @@ -1014,9 +1014,9 @@ The following throw errors since they aren't yet supported. They're all extremel
- Not supportable:
- Other callouts: `(?{…})`, `(*…)`, etc.

See also the [supported features](#-supported-features) table (above) which describes some additional rarely-used sub-features that aren't currently supported.
See also the [supported features](#-supported-features) table (above) which describes some additional rarely-used sub-features that aren't yet supported.

Note that Oniguruma-To-ES supports 99.9+% of real-world Oniguruma regexes, based on a sample of tens of thousands of regexes used in TextMate grammars. Of the features listed above, conditionals were used in three regexes. The rest weren't used at all. Some Oniguruma features are so exotic that they're *used* zero times in all of public GitHub.
Note that **Oniguruma-To-ES supports 99.9+%** of real-world Oniguruma regexes, based on a sample of tens of thousands of regexes used in TextMate grammars. Of the unsupported features listed above, conditionals were used in three regexes, and the rest weren't used at all. Some Oniguruma features are so exotic that they're not used in *any* public code on GitHub.

Contributions are welcome if you want to add support for currently unsupported features.

Expand Down

0 comments on commit a6cb180

Please sign in to comment.