discovery icon indicating copy to clipboard operation
discovery copied to clipboard

Shell can't be copied

Open Arthur-Milchior opened this issue 2 years ago • 0 comments

On https://docs.rust-embedded.org/discovery/microbit/03-setup/index.html you got

$ rustc -V
rustc 1.53.0 (53cb7b09b 2021-06-17)

Both github and your website allow to copy code. The trouble is, with the way your markdown is, it believes that the second line and that the dollar symbols are both part of the codes. Which means that we can't just copy those lines into a terminal.

So, I'd suggest (and be willing to do the work if you accept that my concern is valid), to remove the dollars and use > for the expected output. I.e.

$ rustc -V

rustc 1.53.0 (53cb7b09b 2021-06-17)

I'l admit that using quote is not very beautiful, but that increases usability.

A note on "copy/pasting" from a book

Generally, to learn, it's better to type code oneself. So I'd not necessarily be in favor of facilitating copying from a teaching book. However, in this case, we are speaking of command to install the build system, something that the reader will probably not do often do and does not seems relevant to learn

Arthur-Milchior avatar Nov 11 '22 09:11 Arthur-Milchior