Preserve newlines on copy-paste
Closed this issue · 4 comments
Compare the copy-paste output of https://goplay.space/#sELgya5VUCI to https://play.golang.org/p/sELgya5VUCI. The newlines are preserved on copy-paste using the official playground. They are not preserved using goplayspace
. This was tested on a Mac running v10.14.5 of macOS Mojave. Other system details can be provided upon request (locale, keyboard layout, browser(s) tested, etc.).
I recommend using a <span>
instead of a <div>
for the stdout
since this seems to fix the issue. I'm a bit busy to implement this, but I can take care of this if everyone else is in a similar boat. Please advise.
I'd be curious to know why this is happening, too (corollary: why <span>
seems to fix the issue).
It looks like an old (18 y.) Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=116083
Its fixed in Firefox 68beta.
@andezr I am indeed using Firefox (good intuition). It seems that this is actually related to https://bugzilla.mozilla.org/show_bug.cgi?id=1174452 which is a regression of the bug that you mentioned. Is that what you understand?
@johnrichardrinehart exactly.
As you can see in comments
status-firefox68: --- → fixed
status-firefox67: --- → wontfix
I'm on 67, but installed 68 portable beta and it's fixed there.
But as a workaround for now you can select a little more from code from output - just select program output with "Program exited." and new lines will be preserved.
Ah, thanks for the nod to the comments section. Deal, I'll select a bit more. Thanks!