Fix erlang module docs in Intellisense (#1719)

This commit is contained in:
Kevin 2023-02-21 15:51:15 +01:00 committed by GitHub
parent 5f56b5b09e
commit 0d058152cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -628,7 +628,7 @@ defmodule Livebook.Intellisense do
render_line_break() |> append_inline(iodata) |> build_md(ast)
end
defp build_md(iodata, [{:p, _, content} | ast]) do
defp build_md(iodata, [{tag, _, content} | ast]) when tag in [:p, :div] do
render_paragraph(content) |> append_block(iodata) |> build_md(ast)
end

View file

@ -1251,6 +1251,9 @@ defmodule Livebook.IntellisenseTest do
assert %{contents: [file_read]} = Intellisense.get_details(":file.read()", 8, context)
assert file_read =~ "Typical error reasons:"
assert %{contents: [crypto]} = Intellisense.get_details(":crypto", 5, context)
assert crypto =~ "This module provides a set of cryptographic functions."
end
@tag :erl_docs