"""
end
# The whole page has to load and then hooks are mounded.
# There may be a tiny delay before the markdown is rendered
# or and editors are mounted, so show neat placeholders immediately.
defp render_markdown_content_placeholder("" = _content) do
assigns = %{}
~L"""
"""
end
defp render_markdown_content_placeholder(_content) do
assigns = %{}
~L"""
"""
end
defp render_editor_content_placeholder("" = _content) do
assigns = %{}
~L"""
"""
end
defp render_editor_content_placeholder(_content) do
assigns = %{}
~L"""
"""
end
defp render_outputs(outputs) do
assigns = %{outputs: outputs}
~L"""
<%= for output <- Enum.reverse(@outputs) do %>
<%= render_output(output) %>
<% end %>
"""
end
defp render_output(output) when is_binary(output) do
assigns = %{output: output}
~L"""
<%= @output %>
"""
end
defp render_output({:inspect_html, inspected_html}) do
assigns = %{inspected_html: inspected_html}
~L"""
<%= raw @inspected_html %>
"""
end
defp render_output({:error, formatted}) do
assigns = %{formatted: formatted}
~L"""
<%= @formatted %>
"""
end
defp render_cell_status(%{evaluation_status: :evaluating}) do
assigns = %{}
~L"""
Evaluating
"""
end
defp render_cell_status(%{evaluation_status: :queued}) do
assigns = %{}
~L"""
Queued
"""
end
defp render_cell_status(%{validity_status: :evaluated}) do
assigns = %{}
~L"""
Evaluated
"""
end
defp render_cell_status(%{validity_status: :stale}) do
assigns = %{}
~L"""