podman.io icon indicating copy to clipboard operation
podman.io copied to clipboard

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

Open mrjones-plip opened this issue 4 months ago • 0 comments

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>

mrjones-plip avatar Oct 08 '24 18:10 mrjones-plip