Module Textile_html (.ml)

module Textile_html: sig .. end
Facilities for converting textile into html

exception Invalid_textile of string
Raises only when function receives invalid AST, for example, with Header 10.
val of_stream : ?escape_cdata:bool ->
?escape_nott:bool -> Textile.block Stream.t -> string Stream.t
Function will not escape special HTML chars if escape is false. Default is true.
val of_block : ?escape_cdata:bool -> ?escape_nott:bool -> Textile.block -> string
The same, but takes one textile block.

Example of use:

let () =
  let to_lines path =
    let chan = open_in path in
      (fun _ ->
        try Some (input_line chan)
        with End_of_file -> Nonein
  let lines = to_lines "test.txt" in
  let textile = Textile_pasrer.of_stream lines in
  Stream.iter print_endline (Textile_html.of_block textile)