mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-11 15:34:37 +08:00
Don't format elements with whitespace-pre
This commit is contained in:
parent
3fcb6b97bb
commit
4206e84682
2 changed files with 10 additions and 8 deletions
|
@ -100,9 +100,12 @@ defmodule LivebookWeb.Output do
|
||||||
assigns = %{message: formatted}
|
assigns = %{message: formatted}
|
||||||
|
|
||||||
~H"""
|
~H"""
|
||||||
<div class="whitespace-pre-wrap font-editor text-gray-500" role="complementary" aria-label="error">
|
<div
|
||||||
<%= ansi_string_to_html(@message) %>
|
class="whitespace-pre-wrap font-editor text-gray-500"
|
||||||
</div>
|
role="complementary"
|
||||||
|
aria-label="error"
|
||||||
|
phx-no-format
|
||||||
|
><%= ansi_string_to_html(@message) %></div>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -135,9 +138,8 @@ defmodule LivebookWeb.Output do
|
||||||
class="whitespace-pre-wrap font-editor text-red-600"
|
class="whitespace-pre-wrap font-editor text-red-600"
|
||||||
role="complementary"
|
role="complementary"
|
||||||
aria-label="error message"
|
aria-label="error message"
|
||||||
>
|
phx-no-format
|
||||||
<%= @message %>
|
><%= @message %></div>
|
||||||
</div>
|
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -21,8 +21,8 @@ defmodule LivebookWeb.Output.TextComponent do
|
||||||
class="overflow-auto whitespace-pre font-editor text-gray-500 tiny-scrollbar"
|
class="overflow-auto whitespace-pre font-editor text-gray-500 tiny-scrollbar"
|
||||||
id={"virtualized-text-#{@id}-content"}
|
id={"virtualized-text-#{@id}-content"}
|
||||||
phx-update="ignore"
|
phx-update="ignore"
|
||||||
>
|
phx-no-format
|
||||||
</div>
|
></div>
|
||||||
<div class="absolute right-2 top-0 z-10">
|
<div class="absolute right-2 top-0 z-10">
|
||||||
<button
|
<button
|
||||||
class="icon-button bg-gray-100"
|
class="icon-button bg-gray-100"
|
||||||
|
|
Loading…
Add table
Reference in a new issue