Module Camlhighlight_write_xhtml


module Camlhighlight_write_xhtml: sig .. end
Facilities for converting highlighted code into Ocsigen's XHTML.M representation.


Public functions


val write : ?class_prefix:string ->
?extra_classes:XHTML.M.nmtoken list ->
?dummy_lines:bool ->
?linenums:bool -> Camlhighlight_core.t -> [> `Div ] XHTML.M.elt
This function converts a value of type Camlhighlight_core.t containing a syntax-highlighted document into its Ocsigen's XHTML.M representation. The optional parameter class_prefix indicates the prefix for the class names of all XHTML elements produced, while extra_classes can be used to provide additional class names for the main container. Also optional are the boolean parameters dummy_lines, and linenums. They indicate whether the generated XHTML should include dummy lines at the beginning and end, and line numbers for the code, respectively.