diff --git a/src/odoc.ml b/src/odoc.ml index 50d61f4a..5e620be6 100644 --- a/src/odoc.ml +++ b/src/odoc.ml @@ -411,7 +411,7 @@ module Gen (S : sig val sctx : SC.t end) = struct |> List.sort ~compare:(fun (x, _) (y, _) -> String.compare (Lib.name x) (Lib.name y)) |> List.iter ~f:(fun (lib, modules) -> - Printf.bprintf b "{1 Library %s}\n" (Lib.name lib); + Printf.bprintf b "{2 Library %s}\n" (Lib.name lib); Buffer.add_string b ( match modules with | [ x ] -> @@ -421,7 +421,7 @@ module Gen (S : sig val sctx : SC.t end) = struct | _ -> sprintf "This library exposes the following toplevel modules:\n\ - {!modules:%s}.\n" + {!modules:%s}\n" (modules |> List.sort ~compare:(fun x y -> Module.Name.compare (Module.name x) (Module.name y)) diff --git a/test/blackbox-tests/test-cases/odoc/run.t b/test/blackbox-tests/test-cases/odoc/run.t index 32a54430..bd9eb6be 100644 --- a/test/blackbox-tests/test-cases/odoc/run.t +++ b/test/blackbox-tests/test-cases/odoc/run.t @@ -41,14 +41,14 @@ $ dune build @foo-mld --display short - {1 Library foo} + {2 Library foo} This library exposes the following toplevel modules: - {!modules:Foo Foo2}. - {1 Library foo.byte} + {!modules:Foo Foo2} + {2 Library foo.byte} The entry point of this library is the module: {!module-Foo_byte}. $ dune build @bar-mld --display short - {1 Library bar} + {2 Library bar} The entry point of this library is the module: {!module-Bar}.