File tree Expand file tree Collapse file tree 8 files changed +12
-15
lines changed Expand file tree Collapse file tree 8 files changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ let traverse ~f t =
15
15
f node.filename node.content;
16
16
List. iter aux node.children
17
17
in
18
- aux t
18
+ List. iter aux t
19
19
20
20
type 'a t = {
21
21
name : string ;
22
- render : 'a -> Types.Page .t -> page ;
22
+ render : 'a -> Types.Page .t -> page list ;
23
23
files_of_url : Url.Path .t -> Fpath .t list ;
24
24
}
25
25
Original file line number Diff line number Diff line change @@ -375,12 +375,12 @@ module Page = struct
375
375
| `Inline -> Some 0 )
376
376
377
377
let rec include_ ?theme_uri indent { Subpage. content; _ } =
378
- [ page ?theme_uri indent content ]
378
+ page ?theme_uri indent content
379
379
380
380
and subpages ?theme_uri indent subpages =
381
381
Utils. list_concat_map ~f: (include_ ?theme_uri indent) subpages
382
382
383
- and page ?theme_uri ?support_uri indent p =
383
+ and page ?theme_uri ?support_uri indent p : Odoc_document.Renderer.page list =
384
384
let { Page. title; header; items = i; url } =
385
385
Doctree.Labels. disambiguate_page p
386
386
and subpages =
@@ -393,11 +393,8 @@ module Page = struct
393
393
let toc = Toc. from_items ~resolve ~path: url i in
394
394
let header = items ~resolve header in
395
395
let content = (items ~resolve i :> any Html. elt list ) in
396
- let page =
397
- Tree. make ?theme_uri ?support_uri ~indent ~header ~toc ~url title content
398
- subpages
399
- in
400
- page
396
+ Tree. make ?theme_uri ?support_uri ~indent ~header ~toc ~url title content
397
+ subpages
401
398
end
402
399
403
400
let render ?theme_uri ?support_uri ~indent page =
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ val render :
5
5
?support_uri : Tree .uri ->
6
6
indent :bool ->
7
7
Types.Page .t ->
8
- Renderer .page
8
+ Renderer .page list
9
9
10
10
val doc :
11
11
xref_base_uri :string ->
Original file line number Diff line number Diff line change @@ -131,6 +131,6 @@ let make ?theme_uri ?support_uri ~indent ~url ~header ~toc title content
131
131
page_creator ?theme_uri ?support_uri ~url title header toc content
132
132
in
133
133
let content ppf = (Html. pp ~indent () ) ppf html in
134
- { Odoc_document.Renderer. filename; content; children }
134
+ [ { Odoc_document.Renderer. filename; content; children } ]
135
135
136
136
let open_details = ref true
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ val make :
37
37
string ->
38
38
Html_types .div_content Html .elt list ->
39
39
Renderer .page list ->
40
- Renderer .page
40
+ Renderer .page list
41
41
(* * [make ?theme_uri (body, children)] calls "the page creator" to turn [body]
42
42
into an [[ `Html ] elt]. If [theme_uri] is provided, it will be used to
43
43
locate the theme files, otherwise the HTML output directory is used. *)
Original file line number Diff line number Diff line change @@ -462,7 +462,7 @@ module Page = struct
462
462
page
463
463
end
464
464
465
- let render ~with_children page = Page. page ~with_children page
465
+ let render ~with_children page = [ Page. page ~with_children page ]
466
466
467
467
let files_of_url url =
468
468
if Link. is_class_or_module_path url then [ Link. filename url ] else []
Original file line number Diff line number Diff line change @@ -7,4 +7,4 @@ val files_of_url : Odoc_document.Url.Path.t -> Fpath.t list
7
7
val render :
8
8
with_children :bool ->
9
9
Odoc_document.Types.Page .t ->
10
- Odoc_document.Renderer .page
10
+ Odoc_document.Renderer .page list
Original file line number Diff line number Diff line change 1
1
open Odoc_document
2
2
3
- let render _ page = Odoc_manpage.Generator. render page
3
+ let render _ page = [ Odoc_manpage.Generator. render page ]
4
4
5
5
let files_of_url url = Odoc_manpage.Link. files_of_url url
6
6
You can’t perform that action at this time.
0 commit comments