diff --git a/css/syntax_highlighting.scss b/css/syntax_highlighting.scss index 87907862dd2..bbd28f0fc16 100644 --- a/css/syntax_highlighting.scss +++ b/css/syntax_highlighting.scss @@ -59,6 +59,10 @@ color: #c5a332; } +.language-bash code:before { + content: '$ '; +} + // keywords in table headers th .k { color: #fff; diff --git a/js/copy_button.js b/js/copy_button.js index 7df65f42e21..5b658e50a08 100644 --- a/js/copy_button.js +++ b/js/copy_button.js @@ -2,12 +2,14 @@ $(document).ready(function() { var codeBlocks = [].concat(...document.querySelectorAll('pre.highlight'), ...document.querySelectorAll('figure.highlight')); codeBlocks.forEach(function (codeBlock) { - var copyButton = document.createElement('button'); - copyButton.className = 'copy'; - copyButton.type = 'button'; - copyButton.ariaLabel = 'Copy code to clipboard'; - copyButton.innerHTML = ''; - codeBlock.append(copyButton); + if (!$(codeBlock).parents().hasClass('language-console')) { + var copyButton = document.createElement('button'); + copyButton.className = 'copy'; + copyButton.type = 'button'; + copyButton.ariaLabel = 'Copy code to clipboard'; + copyButton.innerHTML = ''; + codeBlock.append(copyButton); + } }); $('main').on('click', 'button.copy', function() {