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

Commit

Permalink
Merge pull request #31 from pusher/add-kotlin
Browse files Browse the repository at this point in the history
Add support for Kotlin code highlighting
  • Loading branch information
lukabratos committed Nov 29, 2017
2 parents f8d0fe4 + 2fcf117 commit e3906b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import swift from 'highlight.js/lib/languages/swift';
import xml from 'highlight.js/lib/languages/xml';
import ruby from 'highlight.js/lib/languages/ruby';
import bash from 'highlight.js/lib/languages/bash';
import kotlin from 'highlight.js/lib/languages/kotlin';
import githubGist from 'react-syntax-highlighter/dist/styles/github-gist';
import glamorous from 'glamorous';
import { rem } from 'polished';
Expand All @@ -25,6 +26,7 @@ registerLanguage('javascript', javascript);
registerLanguage('swift', swift);
registerLanguage('bash', bash);
registerLanguage('ruby', ruby);
registerLanguage('kotlin', kotlin);

const CodeContainer = glamorous(Block)(
{
Expand Down Expand Up @@ -72,6 +74,7 @@ const languageMap = {
swift: 'Swift',
ruby: 'Ruby',
bash: 'Bash',
kotlin: 'Kotlin',
};

class Code extends Component {
Expand All @@ -92,6 +95,7 @@ class Code extends Component {
'swift',
'ruby',
'bash',
'kotlin',
]),
menu: PropTypes.bool,
style: PropTypes.object, // eslint-disable-line react/forbid-prop-types
Expand Down

0 comments on commit e3906b3

Please sign in to comment.