Skip to content

Commit 998739c

Browse files
committed
more fixes
1 parent cfdb926 commit 998739c

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

src/markdown/generator.ml

+2-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type args = { generate_links : bool }
1818
let rec source_contains_text (s : Source.t) =
1919
let inline_contains_text (i : Inline.t) =
2020
let check_inline_desc (i : Inline.desc) =
21-
match i with Text "" -> false | Text _ | _ -> true
21+
match i with Text "" | Text " " -> false | Text _ | _ -> true
2222
in
2323
List.exists (fun { Inline.desc = d; _ } -> check_inline_desc d) i
2424
in
@@ -71,10 +71,7 @@ and inline (l : Inline.t) args =
7171
++ continue rest)
7272
(continue content ++ continue rest)
7373
| InternalLink (Unresolved content) -> continue content ++ continue rest
74-
| Source content ->
75-
cond
76-
(source_code content args ++ continue rest)
77-
(source_code content args ++ continue rest)
74+
| Source content -> source_code content args ++ continue rest
7875
| Raw_markup _ -> noop
7976
(* TODO: handle this well! *))
8077

test/integration/markdown.t/run.t

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
$ ocamlc -c -bin-annot test.mli
22
$ odoc compile test.cmti
3-
File "test.mli", line 39, characters 13-22:
3+
File "test.mli", line 41, characters 13-22:
44
Warning: '{foo_bar}': bad markup.
55
Suggestion: did you mean '{!foo_bar}' or '[foo_bar]'?
66
$ odoc link test.odoc
@@ -22,15 +22,15 @@
2222

2323
######    type y'
2424

25-
######    module Bar : sig ... end
25+
######    module Bar : sig ... end
2626

27-
######    module type Foo = sig
27+
######    module type Foo = sig
2828

2929
######        type foo
3030

3131
docs for x
3232

33-
######        module type Foo' = sig
33+
######        module type Foo' = sig
3434

3535
######            type foo'
3636

@@ -117,7 +117,7 @@
117117

118118
David Sheets
119119

120-
######    module Foo : sig ... end
120+
######    module Foo : sig ... end
121121

122122
The end foo end keyword in doc comment.
123123

0 commit comments

Comments
 (0)