syntax-highlighting
This collection is for general-purpose syntax highlighting in Racket. This project is incomplete. If you wish to fast track development, please consider supporting it.
1 An Insecure Stopgap
(require syntax-highlighting/lusever) | |
package: syntax-highlighting |
Syntax highlighting is a hard problem. Right now, there’s no pure-Racket solution for it. You can either install a seperate app, or use this quick and very... very dirty module. I do not endorse this module for widespread use. I only provide it for those who understand and accept the risks discussed below.
procedure
(highlight-code/insecure language theme code) → xexpr? language : symbol? theme : symbol? code : string?
If you see a value with spaces and special characters like R Console (R.app), pass it to this procedure as '|R Console (R.app)|.
BEWARE: Do NOT pass anything you do not want shared to this procedure! The service only uses HTTP, so whatever you send is clear text.
Obviously, this procedure only works online. If it fails to highlight your code, it will return said code in a pre element, but without any styles.