diff --git a/lib/livebook/intellisense.ex b/lib/livebook/intellisense.ex index 223feb04c..4b4461203 100644 --- a/lib/livebook/intellisense.ex +++ b/lib/livebook/intellisense.ex @@ -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 diff --git a/test/livebook/intellisense_test.exs b/test/livebook/intellisense_test.exs index 453f3247f..bea447ac5 100644 --- a/test/livebook/intellisense_test.exs +++ b/test/livebook/intellisense_test.exs @@ -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