Skip to content

Commit 27622e8

Browse files
committed
add some code annotations
1 parent 0bb4275 commit 27622e8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/markdown/generator.ml

+4-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ let rec source_code (s : Source.t) args =
3838
in
3939
match h with
4040
| Source.Elt i -> inline i args ++ continue t
41-
| Tag (Some "arrow", _) -> text "->"
41+
| Tag (Some "arrow", _) ->
42+
text "->" (* takes care of the Entity branch of Inline.t *)
4243
| Tag (_, s) -> continue s ++ continue t)
4344

4445
and inline (l : Inline.t) args =
@@ -173,10 +174,10 @@ let rec documented_src (l : DocumentedSrc.t) args nbsps =
173174
let doc = match doc with [] -> noop | doc -> block doc args in
174175
let content =
175176
match content with
176-
| `D code ->
177+
| `D code (* for record fields and polymorphic variants *) ->
177178
paragraph
178179
(item_prop ++ nbsps' ++ (nbsp ++ nbsp) ++ inline code args)
179-
| `N l ->
180+
| `N l (* for constructors *) ->
180181
let c, rest = take_code l in
181182
blocks
182183
(paragraph

0 commit comments

Comments
 (0)