Svelte Universal Highlighter π
β‘οΈ Working demo: https://svelte-universal-highlighter.vercel.app/
βοΈ Description
A syntax highlighter built with Svelteπ It's "universal" because you can switch between highlighter implementations according to supported languages or preferred themes etc. Furthermore, you can even highlight codes in unknown languages, thanks to GPT!
β
Supported highlighters
- Prism (12 languages[^1])
- highlight.js (192 languages)
- GPT (β languages!)
- OpenAI's API key required.
[^1]: Prism itself supports more languages, but we only support languages that are initially available due to technical reason.
ποΈ Usage
- Go to demo page.
- Copy and paste the code you want to highlight in [code].
- Select implementation from [highlighter].
- If you select [GPT], fill your key in [OpenAI API key].
- Select language of the code from [langage].
- Select preferred theme from [theme].
- You will get a beautiful output in [preview] :)
Enjoy! π
π§βπ» Developers