Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Add support for kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
Dom Harrington committed Aug 13, 2018
1 parent c86aa51 commit 6808f36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/syntax-highlighter/codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
};
Expand Down
4 changes: 4 additions & 0 deletions packages/syntax-highlighter/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ test('should work for html', () => {
'<span class="cm-s-neo"><span class="cm-tag cm-bracket">&lt;</span><span class="cm-tag">p</span><span class="cm-tag cm-bracket">></span>test<span class="cm-tag cm-bracket">&lt;/</span><span class="cm-tag">p</span><span class="cm-tag cm-bracket">></span></span>',
);
});

test('should work for kotlin', () => {
expect(syntaxHighlighter('println("$index: $element")', 'kotlin')).toContain('cm-variable');
});

0 comments on commit 6808f36

Please sign in to comment.