Skip to content

Commit

Permalink
fix: remove shell code copy trailing newline (#1561)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhengqbbb committed Oct 31, 2022
1 parent 4b0b1ef commit f36cd0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/app/composables/copyCode.ts
Expand Up @@ -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(() => {
Expand Down

0 comments on commit f36cd0d

Please sign in to comment.