We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5058894 + fcf2f26 commit 2619b2dCopy full SHA for 2619b2d
assets/js/click-to-copy.js
@@ -1,7 +1,8 @@
1
let codeListings = document.querySelectorAll('.highlight > pre');
2
3
const copyCode = (codeSample) => {
4
- navigator.clipboard.writeText(codeSample.textContent.trim() + '\n');
+ const fullText = codeSample.textContent.trim();
5
+ navigator.clipboard.writeText(fullText.replaceAll('$ ', '') + '\n');
6
};
7
8
for (let index = 0; index < codeListings.length; index++) {
0 commit comments