summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorFlorian Orben <florian.orben@gmail.com>2015-10-24 21:55:16 +0200
committerFlorian Orben <florian.orben@gmail.com>2015-10-24 21:55:44 +0200
commit51032ae11de9158ea6a4a4be6b73c621b1c75f2a (patch)
tree5278d15cc6e4a13d6717077fb2844f77e3ffbecd /web
parent9fd9fb1722edfa4aa2e77aa25abfe3e317160839 (diff)
downloadchat-51032ae11de9158ea6a4a4be6b73c621b1c75f2a.tar.gz
chat-51032ae11de9158ea6a4a4be6b73c621b1c75f2a.tar.bz2
chat-51032ae11de9158ea6a4a4be6b73c621b1c75f2a.zip
Add java and ini language
Forgot to add those altough they are quite common
Diffstat (limited to 'web')
-rw-r--r--web/react/utils/constants.jsx4
-rw-r--r--web/react/utils/markdown.jsx4
2 files changed, 7 insertions, 1 deletions
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx
index 9c079bb87..c20d84f40 100644
--- a/web/react/utils/constants.jsx
+++ b/web/react/utils/constants.jsx
@@ -342,6 +342,8 @@ module.exports = {
cpp: 'C++',
sql: 'SQL',
go: 'Go',
- ruby: 'Ruby'
+ ruby: 'Ruby',
+ java: 'Java',
+ ini: 'ini'
}
};
diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx
index f1d15615e..01cc309b8 100644
--- a/web/react/utils/markdown.jsx
+++ b/web/react/utils/markdown.jsx
@@ -28,6 +28,8 @@ const highlightJsCpp = require('highlight.js/lib/languages/cpp.js');
const highlightJsSql = require('highlight.js/lib/languages/sql.js');
const highlightJsGo = require('highlight.js/lib/languages/go.js');
const highlightJsRuby = require('highlight.js/lib/languages/ruby.js');
+const highlightJsJava = require('highlight.js/lib/languages/java.js');
+const highlightJsIni = require('highlight.js/lib/languages/ini.js');
const Constants = require('../utils/constants.jsx');
const HighlightedLanguages = Constants.HighlightedLanguages;
@@ -63,6 +65,8 @@ export class MattermostMarkdownRenderer extends marked.Renderer {
highlightJs.registerLanguage('sql', highlightJsSql);
highlightJs.registerLanguage('go', highlightJsGo);
highlightJs.registerLanguage('ruby', highlightJsRuby);
+ highlightJs.registerLanguage('java', highlightJsJava);
+ highlightJs.registerLanguage('ini', highlightJsIni);
}
code(code, language) {