Skip to content

Commit

Permalink
Add media to search traverse
Browse files Browse the repository at this point in the history
Signed-off-by: Paul-Elliot <[email protected]>
  • Loading branch information
panglesd committed Jan 10, 2024
1 parent 975bdde commit 4e40617
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/search/entry.ml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ and entries_of_doc id d =
| `Verbatim _ -> [ entry ~id ~doc:[ d ] ~kind:(Doc Verbatim) ]
| `Math_block _ -> [ entry ~id ~doc:[ d ] ~kind:(Doc MathBlock) ]
| `Table _ -> []
| `Media (_, _, content) ->
entries_of_doc id { d with value = `Paragraph content }

let entries_of_item id (x : Odoc_model.Fold.item) =
match x with
Expand Down
4 changes: 2 additions & 2 deletions src/search/text.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ module Of_document = struct
| Entity e -> "&" ^ e
| Linebreak -> "\n"
| Styled (_, t) -> inline t
| Link (_, t) -> inline t
| InternalLink { content; _ } -> inline content
| Link { content; _ } -> inline content
| Source s -> source s
| Math m -> m
| Raw_markup _ -> ""
Expand Down Expand Up @@ -59,6 +58,7 @@ module Of_comments = struct
| `Code_block (_, s, _todo) -> s |> get_value
| `Verbatim v -> v
| `Math_block m -> m
| `Media (_, _, is) -> inlines is
| `Table _ -> (* TODO *) ""

and nestable (n : Odoc_model.Comment.nestable_block_element) =
Expand Down

0 comments on commit 4e40617

Please sign in to comment.