diff --git a/source/_posts/ruby.md b/source/_posts/ruby.md index eee2041..10803dc 100644 --- a/source/_posts/ruby.md +++ b/source/_posts/ruby.md @@ -11,6 +11,7 @@ intro: | The [Ruby](https://www.ruby-lang.org/) cheat sheet is a one-page reference sheet for the Ruby programming language. plugins: - copyCode + - runCode --- ## Getting Started diff --git a/themes/coo/layout/_partial/scripts.ejs b/themes/coo/layout/_partial/scripts.ejs index 57a39f3..ab1cd88 100644 --- a/themes/coo/layout/_partial/scripts.ejs +++ b/themes/coo/layout/_partial/scripts.ejs @@ -85,7 +85,7 @@ let content = codeBlock.textContent || ''; let language = [...codeBlock.classList].filter(c => c.startsWith("language-"))[0].replace("language-", ""); - if (language === 'shell') return; + if (['shell', 'bash'].includes(language)) return; // Create a run button element const runButton = document.createElement('button'); @@ -103,7 +103,7 @@ language = 'typescript'; } - const editorId = ['js', 'javascript', 'typescript', 'python', 'php'].includes(language) + const editorId = ['js', 'javascript', 'typescript', 'python', 'php', 'ruby'].includes(language) ? 'script' : ['css', 'scss'].includes(language) ? 'style'