From 5c28df96727e8cf589e4b62ff617554639fe5ac2 Mon Sep 17 00:00:00 2001 From: Hatem Hosny Date: Sun, 5 Jan 2025 14:34:25 +0200 Subject: [PATCH] feat: add support for running es6 --- source/_posts/es6.md | 1 + themes/coo/layout/_partial/scripts.ejs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/_posts/es6.md b/source/_posts/es6.md index 8139520..3b39a1f 100644 --- a/source/_posts/es6.md +++ b/source/_posts/es6.md @@ -11,6 +11,7 @@ intro: | A quick reference cheatsheet of what's new in JavaScript for ES2015, ES2016, ES2017, ES2018 and beyond plugins: - copyCode + - runCode --- ## Getting Started diff --git a/themes/coo/layout/_partial/scripts.ejs b/themes/coo/layout/_partial/scripts.ejs index 59c627f..0628c4b 100644 --- a/themes/coo/layout/_partial/scripts.ejs +++ b/themes/coo/layout/_partial/scripts.ejs @@ -102,7 +102,7 @@ language = 'typescript'; } - const editorId = ['javascript', 'typescript', 'python', 'php'].includes(language) + const editorId = ['js', 'javascript', 'typescript', 'python', 'php'].includes(language) ? 'script' : ['css', 'scss'].includes(language) ? 'style'