Skip to content
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

code snippets have copy link, but include leading $ so fail #338

Open
mrjones-plip opened this issue Oct 8, 2024 · 0 comments
Open

code snippets have copy link, but include leading $ so fail #338

mrjones-plip opened this issue Oct 8, 2024 · 0 comments

Comments

@mrjones-plip
Copy link

On the getting started page there's a couple of code snippets that are meant to by copied, like this one:

Image

However, when you copy it, you get this snippet in your clippboard:

$ podman run -dt -p 8080:80/tcp docker.io/library/httpd 

And when I run it, I unsurprisingly get:

$ $ podman run -dt -p 8080:80/tcp docker.io/library/httpd 
zsh: command not found: $

This is because there's a leading $ at the front of line. one way to solve this is with the css approach. Here's some faux code:

<style>
.no-select {
  user-select: none;
}
</style>

<div class="snippet">
<span class=""no-select">$ </span>podman run -dt -p 8080:80/tcp docker.io/library/httpd 
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant