Steven Levithan
Steven Levithan
`\h` means "hexadecimal digit" (`[0-9A-Fa-f]`, `\p{AHex}`) in some other regex flavors like Oniguruma and Onigmo.
As of Shiki 3.9.1 (after an update for one of the grammars), all grammars that Shiki includes are now supported. See the [compatibility report](https://shiki.style/references/engine-js-compat). I've edited the details above to...
Looks like https://github.com/shikijs/textmate-grammars-themes/pull/131 is a proposed fix for this.
This is out of of date since Shiki 1.23.0+ no longer uses `oniguruma-to-js`, and the replacement JS library doesn't use the `rewrite` function highlighted in the error here. Is this...
@Axelwickm it sounds like some kind of issue/bug in a bundler or build tool, since it makes no sense to try to import from `node_modules/oniguruma-to-es/dist/index.min.js`. That file is a browser...
Per your description, this case-insensitive mapping from one to multiple chars seems like a mess. I ran just your first test in Oniguruma, and it's doing the same thing as...
A few other examples of regexes that include nonparticipating capturing groups: - `(\1)` - should fail to match - `(a)|b\1` - should never match the second alternative - `(?a)|(?)\k` -...
There are optimizations not used in the testing above like precompiling the grammars, applying progressively, etc., and I mentioned up front that it would be slower for some grammars so...
> Can you reproduce that in the tests as well? Yes. I just updated `engine-javascript/test/raw.test.ts` to additionally import `@shikijs/langs-precompiled/python` and then added the following test: ```js expect( shiki.codeToHtml('"""test"""', { lang:...
By looking at the Python grammar's [`begin`/`end` regexes for docstrings](https://github.com/shikijs/textmate-grammars-themes/blob/5f6bac9e95a23a4d66e1e9449b1bef07deb76f42/packages/tm-grammars/grammars/python.json#L401-L412) (which is where the problem starts in the screenshot and the test above), I've realized the cause of the problem....