-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dollar sign exclusion from copy to clipboard snippets #4080
Comments
I would also argue, in most cases, we should be using "bash" instead of "console" to give us better markdown syntax highlighting. I'll save that discussion for a later change. |
Very much sympathetic here, but yeah, there’s a long history here. Long story short, yep, totally worth solving… upstream in mdbook! However, the one attempt I see upstream got closed in frustration after it sat unresolved for a long time! I’ll nudge the primary mdbook maintainers about what we might do to address it. I’m going to go ahead and close this here, but thanks for the nudge on it! |
For reference, I started a Zulip thread about this, as well as leaving a note a few weeks ago on a relevant (closed) PR on |
Every time I use the markdown copy to clipboard button it copies the entire contents of the code snippet. Every copy to clipboard code example in this entire Rust Book are prefixed with the "$" sign. I completely understand, from a readability standpoint what the $ indicates, but by including this within the contents of the "copy to clipboard" markdown, when copying I then have to also manually delete the "$" before running any code example in my local console. Does the user experience annoyance of having to manually delete each "$" outweigh the readability of having the dollar sign within the "copy to clipboard" markdown? As someone who is currently learning Rust and who is immensely annoyed enough to make this recommendation, I would say yes, but I'm happy to be convinced otherwise.
I'm willing to walk the walk and make these changes globally on a fork PR with a single find/replace change, but I don't want to do all that effort if its unlikely to be accepted by the hardworking community who maintains this repo.
Again, I think this proposal would greatly improve the user experience of not having to delete each dollar sign anytime I want to copy a code snippet to clipboard.
An example of what I'm recommending.
Change this:
$ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
To this:
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
Thoughts? Already had this discussion?
The text was updated successfully, but these errors were encountered: