Skip to content

Commit

Permalink
Readme tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
slevithan committed Nov 22, 2024
1 parent a5a55b0 commit f6289f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,7 @@ Sets the level of emulation rigor/strictness.
<details>
<summary>More details</summary>

#### `strict`

Supports slightly fewer features, but the missing features are all relatively uncommon (see below).

#### `default`

Supports all features of `strict`, plus the following additional features, depending on `target`:
Using default `accuracy` adds support for the following, depending on `target`:

- All targets (`ES2025` and earlier):
- Enables use of `\X` using a close approximation of a Unicode extended grapheme cluster.
Expand Down Expand Up @@ -214,8 +208,8 @@ Using a high limit has a small impact on performance. Generally, this is only a
Advanced options that take precedence over standard error checking and flags when enabled.

- `allowAllSearchStartAnchors`: Silences errors for unsupported uses of the search-start anchor `\G`.
- Oniguruma-To-ES uses a variety of strategies to accurately emulate many common uses of `\G`. When using this option, if a `\G` is found that doesn't have a known emulation strategy, the `\G` is simply removed and JavaScript's `y` (`sticky`) flag is added. This might lead to some false positives and negatives, but is useful for non-critical matching like syntax highlighting when having some mismatches is better than not working.
- `allowOrphanBackrefs`: Useful with TextMate grammars that merge backreferences across `begin` and `end` patterns.
- Oniguruma-To-ES uses a variety of strategies to accurately emulate many common uses of `\G`. When using this option, if a `\G` is found that doesn't have a known emulation strategy, the `\G` is simply removed and JavaScript's `y` (`sticky`) flag is added. This might lead to some false positives and negatives, but is useful for non-critical matching (like syntax highlighting) when having some mismatches is better than not working.
- `allowOrphanBackrefs`: Useful with TextMate grammars that merge backreferences across patterns.
- `asciiWordBoundaries`: ASCII-only `\b` and `\B`.

### `target`
Expand Down
2 changes: 1 addition & 1 deletion src/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function getOptions(options) {
overrides: {
// Silences errors for unsupported uses of the search-start anchor `\G`.
allowAllSearchStartAnchors: false,
// Useful with TextMate grammars that merge backreferences across `begin` and `end` patterns.
// Useful with TextMate grammars that merge backreferences across patterns.
allowOrphanBackrefs: false,
// ASCII-only `\b` and `\B`.
asciiWordBoundaries: false,
Expand Down

0 comments on commit f6289f8

Please sign in to comment.