-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add JavaScript Raw engine to the playground #115
Comments
The raw engine requires the grammar to be pre-compiled, which doesn't really apply to this repo as the grammar's regex here is in string format. If we compile them there, it's essentially the same as the JavaScript engine, raw engine is more for smaller bundle size.
This sounds good to have |
Maybe it could be a "precompiled" checkbox for the JavaScript engine, rather than listed as a separate engine? Yes, it would be the same engine, but including an option for precompiled grammars would allow checking two specific things:
That's fair. But I'm assuming it could be made to work using the existing @shikijs/langs-precompiled without changes in this repo? In any case, no worries at all if you think it's better to not include it! |
The point of the playground is to run the latest grammars and themes from the source. Using
|
I think you're right to leave it out -- it's not designed to be my personal debugging playground 🙂 However, note that while In theory your points 1 and 2 above are true, in practice they might not be.
|
Yeah, but that sounds more like the issues on the Shiki side, there we are more focused on the grammar themselves. If we want to test the precompiled engine/logic, we better to it in the main shiki repo |
Currently, the grammar/theme playground allows switching between the Oniguruma and JavaScript engines, and for the JavaScript engine it allows toggling the
forgiving
option.It would be helpful for experimentation and debugging if you could also choose Shiki's JavaScript Raw engine.
Less important, but it might also be helpful if for the non-raw JavaScript engine you could also set the
target
option's value (auto
,ES2025
,ES2024
,ES2018
).The text was updated successfully, but these errors were encountered: