Skip to content

Commit fe8edb9

Browse files
committed
Children order: compatibility
1 parent 391e4b1 commit fe8edb9

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

src/document/sidebar.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
open Odoc_utils
12
open Types
23

34
let sidebar_toc_entry id content =

src/model/frontmatter.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ let parse_child c =
2222

2323
let parse s =
2424
let entries =
25-
s |> String.split_on_char '\n'
25+
s
26+
|> Astring.String.cuts ~sep:"\n"
2627
|> List.map (fun l ->
2728
l |> fun x ->
2829
Astring.String.cut ~sep:":" x |> function

src/model/sidebar.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
open Odoc_utils
12
open Paths.Identifier
23

34
module CPH = Hashtbl.ContainerPage
@@ -48,7 +49,7 @@ module PageToc = struct
4849
let leafs (_, dir_content) =
4950
LPH.fold
5051
(fun id { title = payload; _ } acc ->
51-
if String.equal "index" (Paths.Identifier.name id) then acc
52+
if Astring.String.equal "index" (Paths.Identifier.name id) then acc
5253
else (id, payload) :: acc)
5354
dir_content.leafs []
5455

@@ -88,7 +89,7 @@ module PageToc = struct
8889
String.compare (Paths.Identifier.name x) (Paths.Identifier.name y))
8990
contents
9091
| Some ch ->
91-
let open Odoc_utils.OptionMonad in
92+
let open OptionMonad in
9293
List.filter_map
9394
(fun c ->
9495
let id =

src/odoc/indexing.ml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
open Odoc_utils
12
open Astring
23
open Odoc_json_index
34
open Or_error
@@ -162,9 +163,9 @@ let compile out_format ~output ~warnings_options ~occurrences ~lib_roots
162163
let children_order = fm.Frontmatter.children_order in
163164
(id, title, children_order))
164165
(List.filter_map
165-
(function
166-
| Paths.Identifier.(
167-
({ iv = #LeafPage.t_pv; _ } as id), pl, fm) ->
166+
Paths.Identifier.(
167+
function
168+
| ({ iv = #LeafPage.t_pv; _ } as id), pl, fm ->
168169
Some (id, pl, fm)
169170
| _ -> None)
170171
pages)

src/odoc/resolver.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ end = struct
8484
match current_root with
8585
| Some root ->
8686
List.fold_left
87-
(fun acc (x, dir) -> if String.equal x root then Some dir else acc)
87+
(fun acc (x, dir) ->
88+
if Astring.String.equal x root then Some dir else acc)
8889
None pkglist
8990
| None -> None
9091
in

0 commit comments

Comments
 (0)