Skip to content

Commit

Permalink
Asset: allow linking of assets
Browse files Browse the repository at this point in the history
Signed-off-by: Paul-Elliot <[email protected]>
  • Loading branch information
panglesd committed Jul 24, 2024
1 parent 35e6485 commit bc50b83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/odoc/odoc_link.ml
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,6 @@ let from_odoc ~resolver ~warnings_options input output =
>>= fun (m, warnings) ->
Odoc_file.save_unit output ~warnings m;
Ok (`Module m)
| Asset_content _ -> failwith "todo"
| Asset_content a ->
Odoc_file.save_asset output ~warnings:[] a;
Ok (`Asset a)
3 changes: 2 additions & 1 deletion src/odoc/rendering.ml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ let documents_of_odocl ~warnings_options ~renderer ~extra ~source ~syntax input
| Unit_content odoctree ->
documents_of_unit ~warnings_options ~source ~syntax ~renderer ~extra
~filename odoctree
| Asset_content _ -> Ok []
| Asset_content _ -> Ok [] (* TODO *)

let documents_of_input ~renderer ~extra ~resolver ~warnings_options ~syntax
input =
Expand All @@ -110,6 +110,7 @@ let documents_of_input ~renderer ~extra ~resolver ~warnings_options ~syntax
| `Module m ->
documents_of_unit ~warnings_options ~source:None ~filename:"" ~syntax
~renderer ~extra m
| `Asset _ -> Ok [] (* TODO *)

let render_document renderer ~sidebar ~output:root_dir ~extra_suffix ~extra doc
=
Expand Down

0 comments on commit bc50b83

Please sign in to comment.