From c529d6305d5b55f7efbc695ae86498fa6a492ea5 Mon Sep 17 00:00:00 2001 From: Martin Bodin Date: Thu, 11 Sep 2025 18:04:42 +0200 Subject: [PATCH] Fixing an issue with the function Xml_print.compose_decl. Also fixing some typos. --- lib/html_sigs.mli | 2 +- lib/svg_f.ml | 2 +- lib/svg_sigs.mli | 2 +- lib/xml_print.ml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/html_sigs.mli b/lib/html_sigs.mli index 1cf169c8f..2d4c43cd0 100644 --- a/lib/html_sigs.mli +++ b/lib/html_sigs.mli @@ -109,7 +109,7 @@ module type T = sig (** A nullary element is an element that doesn't have any children. *) type ('a, 'b) nullary = ?a:('a attrib list) -> unit -> 'b elt - (** A unary element is an element that have exactly one children. *) + (** A unary element is an element that has exactly one children. *) type ('a, 'b, 'c) unary = ?a:('a attrib list) -> 'b elt wrap -> 'c elt (** A star element is an element that has any number of children, including zero. *) diff --git a/lib/svg_f.ml b/lib/svg_f.ml index 3a6a13ff5..895a55209 100644 --- a/lib/svg_f.ml +++ b/lib/svg_f.ml @@ -123,7 +123,7 @@ struct let standard = "http://www.w3.org/TR/svg11/" let namespace = "http://www.w3.org/2000/svg" let doctype = - Xml_print.compose_doctype"svg" + Xml_print.compose_doctype "svg" ["-//W3C//DTD SVG 1.1//EN"; "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"] end diff --git a/lib/svg_sigs.mli b/lib/svg_sigs.mli index 94bf76ed7..22fc05bdd 100644 --- a/lib/svg_sigs.mli +++ b/lib/svg_sigs.mli @@ -88,7 +88,7 @@ module type T = sig (** A nullary element is an element that doesn't have any children. *) type ('a, 'b) nullary = ?a: (('a attrib) list) -> unit -> 'b elt - (** A unary element is an element that have exactly one children. *) + (** A unary element is an element that has exactly one children. *) type ('a, 'b, 'c) unary = ?a: (('a attrib) list) -> 'b elt wrap -> 'c elt (** A star element is an element that has any number of children, including zero. *) diff --git a/lib/xml_print.ml b/lib/xml_print.ml index 4ca20aca0..a08cd683d 100644 --- a/lib/xml_print.ml +++ b/lib/xml_print.ml @@ -49,8 +49,8 @@ let encode_unsafe_char_and_at s = let compose_decl ?(version = "1.0") ?(encoding = "UTF-8") () = Format.sprintf - {|\n|} - version encoding + {|%c|} + version encoding '\n' let compose_doctype dt args = let pp_args fmt = function