diff --git a/app/markdown/lib/hljs.js b/app/markdown/lib/hljs.js
index 1873a07ed98b..23790031e0cd 100644
--- a/app/markdown/lib/hljs.js
+++ b/app/markdown/lib/hljs.js
@@ -183,11 +183,38 @@ import xl from 'highlight.js/lib/languages/xl';
import xquery from 'highlight.js/lib/languages/xquery';
import zephir from 'highlight.js/lib/languages/zephir';
+
+hljs.registerLanguage('javascript', javascript);
+hljs.registerLanguage('typescript', typescript);
+hljs.registerLanguage('python', python);
+hljs.registerLanguage('java', java);
+hljs.registerLanguage('php', php);
+hljs.registerLanguage('css', css);
+hljs.registerLanguage('markdown', markdown);
+hljs.registerLanguage('dockerfile', dockerfile);
+hljs.registerLanguage('json', json);
+hljs.registerLanguage('r', r);
+hljs.registerLanguage('objectivec', objectivec);
+hljs.registerLanguage('swift', swift);
+hljs.registerLanguage('matlab', matlab);
+hljs.registerLanguage('kotlin', kotlin);
+hljs.registerLanguage('go', go);
+hljs.registerLanguage('ruby', ruby);
+hljs.registerLanguage('scala', scala);
+hljs.registerLanguage('rust', rust);
+hljs.registerLanguage('dart', dart);
+hljs.registerLanguage('lua', lua);
+hljs.registerLanguage('ada', ada);
+hljs.registerLanguage('groovy', groovy);
+hljs.registerLanguage('julia', julia);
+hljs.registerLanguage('julia-repl', juliaRepl);
+hljs.registerLanguage('haskell', haskell);
+hljs.registerLanguage('delphi', delphi);
+hljs.registerLanguage('clean', clean);
hljs.registerLanguage('1c', onec);
hljs.registerLanguage('abnf', abnf);
hljs.registerLanguage('accesslog', accesslog);
hljs.registerLanguage('actionscript', actionscript);
-hljs.registerLanguage('ada', ada);
hljs.registerLanguage('angelscript', angelscript);
hljs.registerLanguage('apache', apache);
hljs.registerLanguage('applescript', applescript);
@@ -210,7 +237,6 @@ hljs.registerLanguage('brainfuck', brainfuck);
hljs.registerLanguage('cal', cal);
hljs.registerLanguage('capnproto', capnproto);
hljs.registerLanguage('ceylon', ceylon);
-hljs.registerLanguage('clean', clean);
hljs.registerLanguage('clojure', clojure);
hljs.registerLanguage('clojure-repl', clojureRepl);
hljs.registerLanguage('cmake', cmake);
@@ -220,15 +246,10 @@ hljs.registerLanguage('crmsh', crmsh);
hljs.registerLanguage('crystal', crystal);
hljs.registerLanguage('cs', cs);
hljs.registerLanguage('csp', csp);
-hljs.registerLanguage('css', css);
hljs.registerLanguage('d', d);
-hljs.registerLanguage('markdown', markdown);
-hljs.registerLanguage('dart', dart);
-hljs.registerLanguage('delphi', delphi);
hljs.registerLanguage('diff', diff);
hljs.registerLanguage('django', django);
hljs.registerLanguage('dns', dns);
-hljs.registerLanguage('dockerfile', dockerfile);
hljs.registerLanguage('dos', dos);
hljs.registerLanguage('dsconfig', dsconfig);
hljs.registerLanguage('dts', dts);
@@ -236,7 +257,6 @@ hljs.registerLanguage('dust', dust);
hljs.registerLanguage('ebnf', ebnf);
hljs.registerLanguage('elixir', elixir);
hljs.registerLanguage('elm', elm);
-hljs.registerLanguage('ruby', ruby);
hljs.registerLanguage('erb', erb);
hljs.registerLanguage('erlang-repl', erlangRepl);
hljs.registerLanguage('erlang', erlang);
@@ -251,13 +271,10 @@ hljs.registerLanguage('gcode', gcode);
hljs.registerLanguage('gherkin', gherkin);
hljs.registerLanguage('glsl', glsl);
hljs.registerLanguage('gml', gml);
-hljs.registerLanguage('go', go);
hljs.registerLanguage('golo', golo);
hljs.registerLanguage('gradle', gradle);
-hljs.registerLanguage('groovy', groovy);
hljs.registerLanguage('haml', haml);
hljs.registerLanguage('handlebars', handlebars);
-hljs.registerLanguage('haskell', haskell);
hljs.registerLanguage('haxe', haxe);
hljs.registerLanguage('hsp', hsp);
hljs.registerLanguage('htmlbars', htmlbars);
@@ -267,13 +284,7 @@ hljs.registerLanguage('inform7', inform7);
hljs.registerLanguage('ini', ini);
hljs.registerLanguage('irpf90', irpf90);
hljs.registerLanguage('isbl', isbl);
-hljs.registerLanguage('java', java);
-hljs.registerLanguage('javascript', javascript);
hljs.registerLanguage('jboss-cli', jbossCli);
-hljs.registerLanguage('json', json);
-hljs.registerLanguage('julia', julia);
-hljs.registerLanguage('julia-repl', juliaRepl);
-hljs.registerLanguage('kotlin', kotlin);
hljs.registerLanguage('lasso', lasso);
hljs.registerLanguage('ldif', ldif);
hljs.registerLanguage('leaf', leaf);
@@ -282,10 +293,8 @@ hljs.registerLanguage('lisp', lisp);
hljs.registerLanguage('livecodeserver', livecodeserver);
hljs.registerLanguage('llvm', llvm);
hljs.registerLanguage('lsl', lsl);
-hljs.registerLanguage('lua', lua);
hljs.registerLanguage('makefile', makefile);
hljs.registerLanguage('mathematica', mathematica);
-hljs.registerLanguage('matlab', matlab);
hljs.registerLanguage('maxima', maxima);
hljs.registerLanguage('mel', mel);
hljs.registerLanguage('mercury', mercury);
@@ -300,14 +309,12 @@ hljs.registerLanguage('nginx', nginx);
hljs.registerLanguage('nimrod', nimrod);
hljs.registerLanguage('nix', nix);
hljs.registerLanguage('nsis', nsis);
-hljs.registerLanguage('objectivec', objectivec);
hljs.registerLanguage('ocaml', ocaml);
hljs.registerLanguage('openscad', openscad);
hljs.registerLanguage('oxygene', oxygene);
hljs.registerLanguage('parser3', parser3);
hljs.registerLanguage('pf', pf);
hljs.registerLanguage('pgsql', pgsql);
-hljs.registerLanguage('php', php);
hljs.registerLanguage('plaintext', plaintext);
hljs.registerLanguage('pony', pony);
hljs.registerLanguage('powershell', powershell);
@@ -318,20 +325,15 @@ hljs.registerLanguage('properties', properties);
hljs.registerLanguage('protobuf', protobuf);
hljs.registerLanguage('puppet', puppet);
hljs.registerLanguage('purebasic', purebasic);
-hljs.registerLanguage('python', python);
hljs.registerLanguage('q', q);
hljs.registerLanguage('qml', qml);
-hljs.registerLanguage('r', r);
-
hljs.registerLanguage('reasonml', reasonml);
hljs.registerLanguage('rib', rib);
hljs.registerLanguage('roboconf', roboconf);
hljs.registerLanguage('routeros', routeros);
hljs.registerLanguage('rsl', rsl);
hljs.registerLanguage('ruleslanguage', ruleslanguage);
-hljs.registerLanguage('rust', rust);
hljs.registerLanguage('sas', sas);
-hljs.registerLanguage('scala', scala);
hljs.registerLanguage('scheme', scheme);
hljs.registerLanguage('scilab', scilab);
hljs.registerLanguage('scss', scss);
@@ -346,7 +348,6 @@ hljs.registerLanguage('stata', stata);
hljs.registerLanguage('step21', step21);
hljs.registerLanguage('stylus', stylus);
hljs.registerLanguage('subunit', subunit);
-hljs.registerLanguage('swift', swift);
hljs.registerLanguage('taggerscript', taggerscript);
hljs.registerLanguage('yaml', yaml);
hljs.registerLanguage('tap', tap);
@@ -355,7 +356,6 @@ hljs.registerLanguage('tex', tex);
hljs.registerLanguage('thrift', thrift);
hljs.registerLanguage('tp', tp);
hljs.registerLanguage('twig', twig);
-hljs.registerLanguage('typescript', typescript);
hljs.registerLanguage('vala', vala);
hljs.registerLanguage('vbnet', vbnet);
hljs.registerLanguage('vbscript', vbscript);
diff --git a/app/markdown/tests/client.tests.js b/app/markdown/tests/client.tests.js
index c665ad7cc30a..41b4df0012bd 100644
--- a/app/markdown/tests/client.tests.js
+++ b/app/markdown/tests/client.tests.js
@@ -227,8 +227,8 @@ const code = {
'```code\n```': codeWrapper('code\n', 'clean'),
'```\ncode```': codeWrapper('code', 'clean'),
'```javascript\nvar a = \'log\';\nconsole.log(a);```': codeWrapper('var a = \'log\';\nconsole.log(a);', 'javascript'),
- '```*code*```': codeWrapper('*code*', 'armasm'),
- '```**code**```': codeWrapper('**code**', 'armasm'),
+ '```*code*```': codeWrapper('*code*', 'markdown'),
+ '```**code**```': codeWrapper('**code**', 'markdown'),
'```_code_```': codeWrapper('_code_', 'sqf'),
'```__code__```': codeWrapper('__code__', 'markdown'),
};