Simple syntax highlighted html generator for Red.
Highlighting is done by css, and sample css files in the 'css' folder.
The code below introduces to-html function.
do %red-light.redto-html generates string of pre and code tag data include the argument code.
to-html {test: 1
print test
; console shows 1}without /header refinement, you need to set css reference on the html manually.
Also source file and url can be used.
to-html %check-folder-or-file.red
to-html https://raw.githubusercontent.com/koba-yu/RedStudy/master/Samples/check-folder-or-file.redWith /header refinement, the html would contain header tag and css reference that was specified by css word.
(Currently it expects the css file exists on the same folder of the html.)
to-html/header {test: 1
print test
; console shows 1} 'monokai_extended ; css name to be used.