mirror of
https://github.com/Fechin/reference.git
synced 2026-11-20 21:23:11 +03:00
feat: add support for running ruby
This commit is contained in:
1 parent
870fe5177b
commit
da53b553ba
2 files changed
+3
-2
No files matched your search
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in new issue
Block a user