Skip to content

Commit

Permalink
Merge pull request desktop#3356 from agisilaos/agis/add-coffeescriptF…
Browse files Browse the repository at this point in the history
…ortTheHighlighterToSupport

Syntax Highlighter: Add support for CoffeeScript
  • Loading branch information
niik authored Nov 17, 2017
2 parents 755443f + e48afa1 commit b3c2124
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/highlighter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ import { ITokens, IHighlightRequest } from '../lib/highlighter/types'
const extensionMIMEMap = new Map<string, string>()

import 'codemirror/mode/javascript/javascript'

extensionMIMEMap.set('.ts', 'text/typescript')
extensionMIMEMap.set('.js', 'text/javascript')
extensionMIMEMap.set('.json', 'application/json')

import 'codemirror/mode/coffeescript/coffeescript'
extensionMIMEMap.set('.coffee', 'text/x-coffeescript')

import 'codemirror/mode/jsx/jsx'
extensionMIMEMap.set('.tsx', 'text/typescript-jsx')
extensionMIMEMap.set('.jsx', 'text/jsx')
Expand Down
1 change: 1 addition & 0 deletions docs/technical/syntax-highlighting.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Initially we support syntax highlighting for the following languages.
- JavaScript
- JSON
- TypeScript
- Coffeescript
- HTML
- Markdown
- Yaml
Expand Down

0 comments on commit b3c2124

Please sign in to comment.