File tree Expand file tree Collapse file tree 2 files changed +0
-26
lines changed
Expand file tree Collapse file tree 2 files changed +0
-26
lines changed Original file line number Diff line number Diff line change @@ -7,23 +7,6 @@ open Odoc_model
77module H = Odoc_model.Paths.Identifier.Hashtbl. Any
88module Id = Odoc_model.Paths. Identifier
99
10- let handle_file file ~unit ~page ~occ =
11- match Fpath. basename file with
12- | s when String. is_prefix ~affix: " index-" s ->
13- Odoc_file. load_index file >> = fun index -> Ok (occ index)
14- | _ -> (
15- Odoc_file. load file >> = fun unit ' ->
16- match unit ' with
17- | { Odoc_file. content = Unit_content unit '; _ } when unit '.hidden ->
18- Error (`Msg " Hidden units are ignored when generating an index" )
19- | { Odoc_file. content = Unit_content unit '; _ } -> Ok (unit unit ')
20- | { Odoc_file. content = Page_content page' ; _ } -> Ok (page page')
21- | _ ->
22- Error
23- (`Msg
24- " Only pages and unit are allowed as input when generating an \
25- index" ))
26-
2710let parse_input_file input =
2811 let is_sep = function '\n' | '\r' -> true | _ -> false in
2912 Fs.File. read input >> = fun content ->
Original file line number Diff line number Diff line change 11open Or_error
22
3- val handle_file :
4- Fpath .t ->
5- unit :(Odoc_model .Lang .Compilation_unit .t -> 'a ) ->
6- page :(Odoc_model .Lang .Page .t -> 'a ) ->
7- occ :(Odoc_index .Skeleton .t list -> 'a ) ->
8- ('a , [> msg ]) result
9- (* * This function is exposed for custom indexers that uses [odoc] as a library
10- to generate their search index *)
11-
123val compile :
134 [ `JSON | `Marshall ] ->
145 output :Fs .file ->
You can’t perform that action at this time.
0 commit comments