mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-11-11 14:42:39 +08:00
Retain newlines in cell output markup for copy/paste (#385)
* Retain newlines in cell output markup for copy/paste * Move line break * Update lib/livebook_web/live/session_live/cell_component.ex Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
This commit is contained in:
parent
7024d22253
commit
4b84a8176d
1 changed files with 2 additions and 1 deletions
|
|
@ -340,7 +340,8 @@ defmodule LivebookWeb.SessionLive.CellComponent do
|
||||||
data-follow="<%= follow %>">
|
data-follow="<%= follow %>">
|
||||||
<div data-template class="hidden">
|
<div data-template class="hidden">
|
||||||
<%= for line <- @lines do %>
|
<%= for line <- @lines do %>
|
||||||
<div><%= line %></div>
|
<%# Add a newline, so that multiple lines can be copied properly %>
|
||||||
|
<div><%= [line, "\n"] %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div data-content class="overflow-auto whitespace-pre font-editor text-gray-500 tiny-scrollbar"
|
<div data-content class="overflow-auto whitespace-pre font-editor text-gray-500 tiny-scrollbar"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue