File tree Expand file tree Collapse file tree 5 files changed +12
-7
lines changed Expand file tree Collapse file tree 5 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1+ open Odoc_utils
12open Types
23
34let sidebar_toc_entry id content =
Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ let parse_child c =
2222
2323let 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
Original file line number Diff line number Diff line change 1+ open Odoc_utils
12open Paths.Identifier
23
34module 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 =
Original file line number Diff line number Diff line change 1+ open Odoc_utils
12open Astring
23open Odoc_json_index
34open 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)
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments