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:
Ben Reinhart 2021-06-22 16:25:46 -07:00 committed by GitHub
parent 7024d22253
commit 4b84a8176d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -340,7 +340,8 @@ defmodule LivebookWeb.SessionLive.CellComponent do
data-follow="<%= follow %>">
<div data-template class="hidden">
<%= for line <- @lines do %>
<div><%= line %></div>
<%# Add a newline, so that multiple lines can be copied properly %>
<div><%= [line, "\n"] %></div>
<% end %>
</div>
<div data-content class="overflow-auto whitespace-pre font-editor text-gray-500 tiny-scrollbar"