Please visit https://graphene.teknologiumum.com for Graphene Web UI and its documentation.
You can read CONTRIBUTING.md before making your PR.
Because it gives pretty much the same accurate highlighting as Visual Studio Code. Though it won't highlight it semantically since it still uses RegEx.
- You send a request with stuff
- Graphene does its magic
- ???
- Profit
ok sorry, click here for the real answer
- You send a POST request with a JSON body containing valid options
- It will highlight the code using Shiki
- Then, it will render the result to svg using our custom svg renderer which is a heavily modified version of the original svg renderer that shiki has.
- Apply border, upscale, and convert to the desired output format using sharpjs
- Send it back to you
I don't even know. This was meant to be a toy project so I just put whatever that came to mind when writing the commit message, but now it became an actual thing.
Well, I made this because I want it to be used programatically, without having to open a browser and doing it myself, or having to scrape carbon.now.sh website using something like puppeteer.
Because it uses Shiki, the highlight produced is more accurate, it's identical to the one used in Visual Studio Code.