defmodule LivebookWeb.Output do
use LivebookWeb, :html
import LivebookWeb.Helpers
alias LivebookWeb.Output
@doc """
Renders a list of cell outputs.
"""
def outputs(assigns) do
~H"""
"""
end
defp render_output({:error, formatted, _type}, %{}) do
render_formatted_error_message(formatted)
end
defp render_output(output, %{}) do
render_error_message("""
Unknown output format: #{inspect(output)}. If you're using Kino,
you may want to update Kino and Livebook to the latest version.
""")
end
defp render_error_message(message) do
assigns = %{message: message}
~H"""
<%= @message %>
"""
end
defp render_formatted_error_message(formatted) do
assigns = %{message: formatted}
~H"""