Skip to content

Commit f36cd0d

Browse files
authoredOct 31, 2022
fix: remove shell code copy trailing newline (#1561)
1 parent 4b0b1ef commit f36cd0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/client/app/composables/copyCode.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function useCopyCode() {
2020
let { innerText: text = '' } = sibling
2121

2222
if (isShell) {
23-
text = text.replace(/^ *(\$|>) /gm, '')
23+
text = text.replace(/^ *(\$|>) /gm, '').trim()
2424
}
2525

2626
copyToClipboard(text).then(() => {

0 commit comments

Comments
 (0)
Please sign in to comment.