mirror of
https://github.com/podman-desktop/podman-desktop
synced 2026-05-24 10:18:53 +00:00
chore: also remove the PowerShell prompt (> ) when copying shell-session content. (#2555)
* chore: also remove the PoserShell prompt (`> `) when copying shell-session content. Signed-off-by: Fabrice Flore-Thébault <ffloreth@redhat.com> * Update website/src/theme/CodeBlock/CopyButton/index.js Signed-off-by: Fabrice Flore-Thébault <ffloreth@redhat.com> --------- Signed-off-by: Fabrice Flore-Thébault <ffloreth@redhat.com>
This commit is contained in:
parent
0d84e45417
commit
e53a545f04
1 changed files with 3 additions and 1 deletions
|
|
@ -24,7 +24,9 @@ export default function CopyButtonWrapper(props) {
|
|||
const updatedProps = { ...props };
|
||||
if (
|
||||
updatedProps?.code?.length > 2 &&
|
||||
(updatedProps.code.substring(0, 2) === '$ ' || updatedProps.code.substring(0, 2) === '# ')
|
||||
(updatedProps.code.substring(0, 2) === '$ ' ||
|
||||
updatedProps.code.substring(0, 2) === '# ' ||
|
||||
updatedProps.code.substring(0, 2) === '> ')
|
||||
) {
|
||||
updatedProps.code = updatedProps.code.substring(2);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue