@@ -11,12 +11,12 @@ module IO = Tiny_httpd_io
11
11
include Tiny_httpd_html_
12
12
(* * @inline *)
13
13
14
- (* * Write an HTML element to this out channel .
14
+ (* * Write an HTML element to this output .
15
15
@param top if true, add DOCTYPE at the beginning. The top element should then
16
16
be a "html" tag.
17
17
@since NEXT_RELEASE
18
18
*)
19
- let to_out_channel ?(top = false ) (self : elt ) (out : IO.Output.t ) : unit =
19
+ let to_output ?(top = false ) (self : elt ) (out : IO.Output.t ) : unit =
20
20
let out = Out. create_of_out out in
21
21
if top then Out. add_string out " <!DOCTYPE html>\n " ;
22
22
self out;
@@ -29,7 +29,7 @@ let to_out_channel ?(top = false) (self : elt) (out : IO.Output.t) : unit =
29
29
let to_string ?top (self : elt ) : string =
30
30
let buf = Buffer. create 64 in
31
31
let out = IO.Output. of_buffer buf in
32
- to_out_channel ?top self out;
32
+ to_output ?top self out;
33
33
Buffer. contents buf
34
34
35
35
(* * Convert a list of HTML elements to a string.
@@ -50,13 +50,13 @@ let to_string_top = to_string ~top:true
50
50
51
51
(* * Write a toplevel element to an output channel.
52
52
@since NEXT_RELEASE *)
53
- let to_out_channel_top = to_out_channel ~top: true
53
+ let to_out_channel_top = to_output ~top: true
54
54
55
55
(* * Produce a streaming writer from this HTML element.
56
56
@param top if true, add a DOCTYPE. See {!to_out_channel}.
57
57
@since NEXT_RELEASE *)
58
58
let to_writer ?top (self : elt ) : IO.Writer.t =
59
- let write oc = to_out_channel ?top self oc in
59
+ let write oc = to_output ?top self oc in
60
60
IO.Writer. make ~write ()
61
61
62
62
(* * Convert a HTML element to a stream. This might just convert
0 commit comments