Skip to content

Commit 39de6d2

Browse files
committed
Add media to search traverse
Signed-off-by: Paul-Elliot <[email protected]>
1 parent 5bdf4a7 commit 39de6d2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/search/entry.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ and entries_of_doc id d =
145145
| `Verbatim _ -> [ entry ~id ~doc:[ d ] ~kind:(Doc Verbatim) ]
146146
| `Math_block _ -> [ entry ~id ~doc:[ d ] ~kind:(Doc MathBlock) ]
147147
| `Table _ -> []
148+
| `Media (_, _, content) ->
149+
entries_of_doc id { d with value = `Paragraph content }
148150

149151
let entries_of_item id (x : Odoc_model.Fold.item) =
150152
match x with

src/search/text.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ module Of_document = struct
1717
| Entity e -> "&" ^ e
1818
| Linebreak -> "\n"
1919
| Styled (_, t) -> inline t
20-
| Link (_, t) -> inline t
21-
| InternalLink { content; _ } -> inline content
20+
| Link { content; _ } -> inline content
2221
| Source s -> source s
2322
| Math m -> m
2423
| Raw_markup _ -> ""
@@ -59,6 +58,7 @@ module Of_comments = struct
5958
| `Code_block (_, s, _todo) -> s |> get_value
6059
| `Verbatim v -> v
6160
| `Math_block m -> m
61+
| `Media (_, _, is) -> inlines is
6262
| `Table _ -> (* TODO *) ""
6363

6464
and nestable (n : Odoc_model.Comment.nestable_block_element) =

0 commit comments

Comments
 (0)