After some user feedback (#quick-questions message), I've made this webpage to expose a simple GUI for @novel pecan 's tool to highlight Typst code using ANSI colors:
https://pgbiel.github.io/typst-ansi-web/
Given the lack of built-in typst codeblocks, frozolotl's tool allows highlighting Typst code on Discord by pasting the output into ```ansi ...``` codeblocks, which is pretty cool. Taking the example from the image:
[0m[35m#context[0m [hi]
I had made a desktop gui for it before for fun (https://github.com/pgbiel/typst-ansi-gui), but its website version didn't work very well (and required WebGPU, severely limiting platform support), so I made this simpler version which should work on most devices and browsers. Let me know what you think!
Current TODOs:
- Dark theme
- More configuration
- "Copy (Discord)" button to copy with the codeblock itself, including backtick escaping