Don't format elements with whitespace-pre

This commit is contained in:
Jonatan Kłosko 2022-08-02 18:22:49 +02:00
parent 3fcb6b97bb
commit 4206e84682
2 changed files with 10 additions and 8 deletions

View file

@ -100,9 +100,12 @@ defmodule LivebookWeb.Output do
assigns = %{message: formatted}
~H"""
<div class="whitespace-pre-wrap font-editor text-gray-500" role="complementary" aria-label="error">
<%= ansi_string_to_html(@message) %>
</div>
<div
class="whitespace-pre-wrap font-editor text-gray-500"
role="complementary"
aria-label="error"
phx-no-format
><%= ansi_string_to_html(@message) %></div>
"""
end
@ -135,9 +138,8 @@ defmodule LivebookWeb.Output do
class="whitespace-pre-wrap font-editor text-red-600"
role="complementary"
aria-label="error message"
>
<%= @message %>
</div>
phx-no-format
><%= @message %></div>
"""
end
end

View file

@ -21,8 +21,8 @@ defmodule LivebookWeb.Output.TextComponent do
class="overflow-auto whitespace-pre font-editor text-gray-500 tiny-scrollbar"
id={"virtualized-text-#{@id}-content"}
phx-update="ignore"
>
</div>
phx-no-format
></div>
<div class="absolute right-2 top-0 z-10">
<button
class="icon-button bg-gray-100"