Stog library reference documentation : Stog_highlight

Module Stog_highlight

module Stog_highlight: sig .. end
Highlighting code.

val external_highlight : opts:string -> string -> Xtmpl.tree list
Call the highlight command on the given string and make it produce xhtml code. Options are passed to the highlight command.
val highlight : ?lang:string -> ?opts:string -> string -> Xtmpl.tree list
Highlight the given code. If a lang and no option are given, then Higlo is tried first. If the language is unknown, we fallback to using external highlight command.
lang : is used to indicate the language.