Skip to content

Commit 2111f54

Browse files
favoniajonludlam
authored andcommitted
Remove impossible cases (links within *_nolink)
1 parent d36e4ca commit 2111f54

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/html/generator.ml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,6 @@ let rec internallink ~config ~emph_level ~resolve ?(a = []) (t : InternalLink.t)
101101
let elt = (elt :> phrasing Html.elt) in
102102
[ elt ]
103103

104-
and internallink_nolink ~emph_level
105-
~(a : Html_types.span_attrib Html.attrib list) (t : InternalLink.t) =
106-
match t with
107-
| Resolved (_, content) | Unresolved content ->
108-
[ Html.span ~a (inline_nolink ~emph_level content) ]
109-
110104
and inline ~config ?(emph_level = 0) ~resolve (l : Inline.t) :
111105
phrasing Html.elt list =
112106
let one (t : Inline.one) =
@@ -146,8 +140,8 @@ and inline_nolink ?(emph_level = 0) (l : Inline.t) :
146140
| Styled (style, c) ->
147141
let emph_level, app_style = styled style ~emph_level in
148142
[ app_style @@ inline_nolink ~emph_level c ]
149-
| Link (_, c) -> inline_nolink ~emph_level c
150-
| InternalLink c -> internallink_nolink ~emph_level ~a c
143+
| Link _ -> assert false
144+
| InternalLink _ -> assert false
151145
| Source c -> source (inline_nolink ~emph_level) ~a c
152146
| Math s -> [ inline_math s ]
153147
| Raw_markup r -> raw_markup r

0 commit comments

Comments
 (0)