Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
slevithan committed Nov 7, 2024
1 parent e9e61c2 commit d8712b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,12 @@ Disables optimizations that simplify the pattern when it doesn't change the mean

## ✅ Supported features

Following are the supported features by target.
Following are the supported features by target. The official Oniguruma [syntax doc](https://github.com/kkos/oniguruma/blob/master/doc/RE) doesn't cover many of the finer details described here.

> [!NOTE]
> Targets `ES2024` and `ESNext` have the same emulation capabilities. Resulting regexes might have different source and flags, but they match the same strings.
Notice that nearly every feature below has at least subtle differences from JavaScript. Some features and subfeatures listed as unsupported are not emulatable using native JavaScript regexes, but support for others might be added in future versions of Oniguruma-To-ES. Unsupported features throw an error.
Notice that nearly every feature below has at least subtle differences from JavaScript. Some features and subfeatures listed as unsupported are not emulatable using native JavaScript regexes, but support for others might be added in future versions of this library. Unsupported features throw an error.

<table>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h1>
<img src="https://upload.wikimedia.org/wikipedia/commons/c/c2/GitHub_Invertocat_Logo.svg" width="25" height="25" alt="GitHub">
</a>
</h1>
<p>This is a basic REPL for testing the output of <a href="https://github.com/slevithan/oniguruma-to-es">Oniguruma-To-ES</a>, an Oniguruma to JavaScript RegExp transpiler. See <a href="https://github.com/kkos/oniguruma/blob/master/doc/RE">Oniguruma syntax</a> for an overview, but there are many subtleties to Oniguruma's differences from JavaScript that aren't shown in the docs.</p>
<p>Use this page to test the output of <a href="https://github.com/slevithan/oniguruma-to-es">Oniguruma-To-ES</a>, an Oniguruma to JavaScript regex transpiler. See <a href="https://github.com/slevithan/oniguruma-to-es#-supported-features">Readme: Supported features</a>.</p>

<h2>Try it</h2>
<p><textarea id="input" spellcheck="false" oninput="autoGrow(this); showOutput(this)"></textarea></p>
Expand Down Expand Up @@ -112,7 +112,7 @@ <h2>Try it</h2>
</details>
<pre id="output"></pre>
<div id="info" class="hidden"><p>✅ A <code>RegExp</code> subclass instance with a custom execution strategy is returned for this pattern. It remains a native JavaScript regex and works the same as <code>RegExp</code> in all contexts.</p></div>
<p>See <a href="https://github.com/slevithan/oniguruma-to-es#-options">Readme: Options</a> for more detailed explanations of each option. The output shows the result of calling <code>toRegExp</code>. Functions <code>toDetails</code> and <code>toOnigurumaAst</code> can be run from the console on this page, and you can pretty-print ASTs by passing them to <code>printAst</code>.</li>
<p>See <a href="https://github.com/slevithan/oniguruma-to-es#-options">Readme: Options</a> for more detailed explanations of each option. The output shows the result of calling <code>toRegExp</code>. Functions <code>toDetails</code> and <code>toOnigurumaAst</code> can also be run from the console on this page. Pretty-print ASTs by passing them to <code>printAst</code>.</li>
</main>

<!-- Hack to make it work on GitHub Pages where `dist/` isn't checked in; use the latest release's copy -->
Expand Down

0 comments on commit d8712b6

Please sign in to comment.