Pluto.jl icon indicating copy to clipboard operation
Pluto.jl copied to clipboard

Can't copy benchmark output as plain text

Open ederag opened this issue 5 months ago • 1 comments

The @benchmark output became unreadable when copied to plain text.

https://github.com/user-attachments/assets/76c7e194-4a10-4f50-9880-cb0575ad5d20

Notebook:

# ╔═╡ 244daf16-420d-11f0-342e-d77cbd5e129c
using BenchmarkTools

# ╔═╡ eafe97b6-22b8-4d64-947a-8cebd94d01df
@benchmark sort(data) setup=(data=rand(10))

Previously the output was monochrome, but it was copy/pastable as plain text.

I guess it is related to PR #3222, since it was not an issue in Pluto-0.20.8, and the screenshot is with Pluto-0.20.10.

ederag avatar Jun 05 '25 13:06 ederag

Labeling this as a good first issue! You can probably do a simple regex replace to remove the ANSI escape code from the to-be-copied text. Search for "Copy output" in our source code to see where this happens.

fonsp avatar Jun 12 '25 07:06 fonsp

Fix confirmed, thank you so much !

ederag avatar Jun 24 '25 17:06 ederag