mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-14 00:44:58 +08:00
Wrap overflowing words in plain text output
This commit is contained in:
parent
a0cc26fd47
commit
b87eb8eb28
1 changed files with 6 additions and 1 deletions
|
@ -23,7 +23,12 @@ defmodule LivebookWeb.Output.PlainTextComponent do
|
||||||
@impl true
|
@impl true
|
||||||
def render(assigns) do
|
def render(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<div id={@id} class="text-gray-700 whitespace-pre-wrap" phx-update="stream" phx-no-format><span
|
<div
|
||||||
|
id={@id}
|
||||||
|
class="text-gray-700 whitespace-pre-wrap break-words"
|
||||||
|
phx-update="stream"
|
||||||
|
phx-no-format
|
||||||
|
><span
|
||||||
:for={{dom_id, chunk}<- @streams.chunks} id={dom_id}><%= chunk.text %></span></div>
|
:for={{dom_id, chunk}<- @streams.chunks} id={dom_id}><%= chunk.text %></span></div>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue