diff --git a/src/client/app/composables/copyCode.ts b/src/client/app/composables/copyCode.ts index b861823be1a..6c82b1b49df 100644 --- a/src/client/app/composables/copyCode.ts +++ b/src/client/app/composables/copyCode.ts @@ -20,7 +20,7 @@ export function useCopyCode() { let { innerText: text = '' } = sibling if (isShell) { - text = text.replace(/^ *(\$|>) /gm, '') + text = text.replace(/^ *(\$|>) /gm, '').trim() } copyToClipboard(text).then(() => {