-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
I believe the docs on the web generator would benefit from our twoslash implementation, although:
- IMO, it should be a generic CSR snippet that goes through all the existing
<pre>elements, gets the raw code, and re-runs Shiki with Twoslash - It is an asynchronous non-blocking screep
- Makes Twoslash a comepletely optional Client-Side feature
- Ensures the actual HTML sizes/bundle sizes aren't impacted
- Only runs on Desktop Environments and unrelated (necessarily to React)
This of course, breaks React's walled-garden concept, although we could also have a Hook that runs only client-side responsible for re-hydrating (re-running Shiki on Twoslash), which technically speaking wouldn't break it.
I'm open to suggestions here :)