diff --git a/packages/syntax-highlighter/codemirror.js b/packages/syntax-highlighter/codemirror.js index 93910b476..f27606113 100644 --- a/packages/syntax-highlighter/codemirror.js +++ b/packages/syntax-highlighter/codemirror.js @@ -41,6 +41,7 @@ const modes = { java: ['clike', 'text/x-java'], scala: ['clike', 'text/x-scala'], objectivec: ['clike', 'text/x-objectivec'], + kotlin: ['clike', 'text/x-kotlin'], liquid: 'htmlmixed', scss: 'css', }; diff --git a/packages/syntax-highlighter/test/index.test.js b/packages/syntax-highlighter/test/index.test.js index 8022242e7..e2f7e619a 100644 --- a/packages/syntax-highlighter/test/index.test.js +++ b/packages/syntax-highlighter/test/index.test.js @@ -42,3 +42,7 @@ test('should work for html', () => { '<p>test</p>', ); }); + +test('should work for kotlin', () => { + expect(syntaxHighlighter('println("$index: $element")', 'kotlin')).toContain('cm-variable'); +});