Skip to content

Commit c0ba997

Browse files
panglesdjonludlam
authored andcommitted
Remove rendering of links to documentation
Signed-off-by: Paul-Elliot <[email protected]>
1 parent d1009b4 commit c0ba997

File tree

2 files changed

+5
-33
lines changed

2 files changed

+5
-33
lines changed

src/html/html_source.ml

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,11 @@ let html_of_doc ~config ~resolve docs =
2424
let children = List.concat @@ List.map (doc_to_html ~is_in_a) docs in
2525
match info with
2626
| Syntax tok -> [ span ~a:[ a_class [ tok ] ] children ]
27-
| Link { documentation; implementation } -> (
28-
let href_implementation =
29-
Option.map (Link.href ~config ~resolve) implementation
30-
in
31-
let href_documentation =
32-
Option.map (Link.href ~config ~resolve) documentation
33-
in
34-
let body =
35-
match href_implementation with
36-
| Some href -> [ a ~a:[ a_href href ] children ]
37-
| None -> children
38-
in
39-
match href_documentation with
40-
| None -> body
41-
| Some href ->
42-
[
43-
span
44-
~a:[ a_class [ "jump-to-doc-container" ] ]
45-
[
46-
span ~a:[] body;
47-
a
48-
~a:[ a_href href; a_class [ "jump-to-doc" ] ]
49-
[ txt " 📖" ];
50-
];
51-
])
27+
(* Currently, we do not render links to documentation *)
28+
| Link { documentation = _; implementation = None } -> children
29+
| Link { documentation = _; implementation = Some anchor } ->
30+
let href = Link.href ~config ~resolve anchor in
31+
[ a ~a:[ a_href href ] children ]
5232
| Anchor lbl -> [ span ~a:[ a_id lbl ] children ])
5333
in
5434
span ~a:[] @@ List.concat @@ List.map (doc_to_html ~is_in_a:false) docs

src/html_support_files/odoc.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,14 +1206,6 @@ td.def-doc *:first-child {
12061206
color: #657b83;
12071207
}
12081208

1209-
.jump-to-doc-container:hover .jump-to-doc {
1210-
display: inline;
1211-
}
1212-
1213-
.jump-to-doc {
1214-
display: none;
1215-
}
1216-
12171209
/* Source directories */
12181210

12191211
.odoc-directory::before {

0 commit comments

Comments
 (0)