Skip to content

Commit 63dc67a

Browse files
committed
render at-tag, key, and definition on one line
1 parent 27622e8 commit 63dc67a

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/markdown/generator.ml

+7-2
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,13 @@ let rec block (l : Block.t) args =
107107
in
108108
let f i =
109109
let key = inline i.Description.key args in
110-
let def = block i.Description.definition args in
111-
blocks (paragraph (join (text "@") key ++ text " : ")) def
110+
let def =
111+
match i.Description.definition with
112+
| [] -> text ""
113+
| h :: _ -> (
114+
match h.desc with Inline i -> inline i args | _ -> text "")
115+
in
116+
paragraph (join (text "@") (join key (text ":")) ++ def)
112117
in
113118
blocks (blocks' (List.map f descrs)) (continue rest)
114119
| Source content ->

test/integration/markdown.t/run.t

+2-6
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,7 @@
134134

135135
David Sheets is the author.
136136

137-
@author :
138-
139-
David Sheets
137+
@author: David Sheets
140138

141139
######     module Foo : sig ... end
142140

@@ -340,9 +338,7 @@
340338

341339
David Sheets is the author.
342340

343-
@author :
344-
345-
David Sheets
341+
@author: David Sheets
346342

347343
<a id="module-Foo"></a>
348344

0 commit comments

Comments
 (0)