Line numbers in copied code

When I select and copy code from the Exercism web site, it often includes line numbers between each line of code.

This bug exists on many different pages, including “your iterations” and “solutions,” but it most often interrupts my flow in mentor discussions. I want to copy a small snippet of code into the discussion or a REPL or my IDE, and instead I get this:

pub fn hello() -> &'static str {
    "Hello, World!"

My workaround is to manually delete each line number or pull the whole solution using the Exercism CLI. Both take about the same amount of time and involve a similar number of keystrokes.

CC @dem4ron

Hey, we’ve got this over the line:

We will follow this up soon with a copy button for solutions too.

1 Like