From 9d1656a3b4b804e29b120dcf37bad1892cb150f4 Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Sun, 18 Aug 2024 00:16:14 +0200 Subject: [PATCH] add support for python --- src/utils.js | 1 + test/unit/serialiseMetadata.test.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/utils.js b/src/utils.js index 7ee74bc..0c0558b 100644 --- a/src/utils.js +++ b/src/utils.js @@ -6,6 +6,7 @@ const getCommentStyle = script => { case 'fennel': return ';;'; case 'ruby': + case 'python': return '#'; case 'js': case 'wren': diff --git a/test/unit/serialiseMetadata.test.js b/test/unit/serialiseMetadata.test.js index e7c50f0..22c9909 100644 --- a/test/unit/serialiseMetadata.test.js +++ b/test/unit/serialiseMetadata.test.js @@ -23,6 +23,7 @@ const testMetadataFormat = (script, expected) => t => { { lang: 'moon', script: 'moon', expected: '-- script:' }, { lang: 'fennel', script: 'fennel', expected: ';; script:' }, { lang: 'ruby', script: 'ruby', expected: '# script:' }, + { lang: 'python', script: 'python', expected: '# script:' }, { lang: 'wren', script: 'wren', expected: '// script:' }, { lang: 'squirrel', script: 'squirrel', expected: '// script:' } ].forEach(({ lang, script, expected }) => test(