Skip to content

Commit 4740cfb

Browse files
authored
fix(docs): support numbered lists in erlang docs (#506)
This was triggered by hovering over `:gen_tcp.close/1`.
1 parent 4c0d582 commit 4740cfb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/next_ls/docs.ex

+8
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ defmodule NextLS.Docs do
140140
"#{to_markdown(type, children)}\n" <> to_markdown(type, rest)
141141
end
142142

143+
def to_markdown("application/erlang+html" = type, [{:ol, _, lis} | rest]) do
144+
"#{to_markdown(type, lis)}\n" <> to_markdown(type, rest)
145+
end
146+
147+
def to_markdown("application/erlang+html" = type, [{:ot, _, children} | rest]) do
148+
"1. #{to_markdown(type, children)}\n" <> to_markdown(type, rest)
149+
end
150+
143151
def to_markdown("application/erlang+html" = type, [{:i, _, children} | rest]) do
144152
"_#{IO.iodata_to_binary(children)}_" <> to_markdown(type, rest)
145153
end

0 commit comments

Comments
 (0)