summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
authorWu Cheng-Han2017-03-26 23:09:13 +0800
committerWu Cheng-Han2017-03-26 23:09:13 +0800
commitb2985085d011cad374c76ae75f548fdefb15c258 (patch)
tree4f28f1392394fa85099bbe0553ccdd4b364a10b4 /public/js
parenta3cdc5ba80b225905c9dc320b03022a379daa880 (diff)
Update to change makefile syntax highlighting to Prism
Diffstat (limited to 'public/js')
-rw-r--r--public/js/extra.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/public/js/extra.js b/public/js/extra.js
index 878609e8..fecd8a8b 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -7,6 +7,7 @@ require('prismjs/components/prism-haskell')
require('prismjs/components/prism-go')
require('prismjs/components/prism-typescript')
require('prismjs/components/prism-jsx')
+require('prismjs/components/prism-makefile')
import Prism from 'prismjs'
import hljs from 'highlight.js'
@@ -516,6 +517,11 @@ export function finishView (view) {
result = {
value: Prism.highlight(code, Prism.languages.wiki)
}
+ } else if (reallang === 'cmake') {
+ code = S(code).unescapeHTML().s
+ result = {
+ value: Prism.highlight(code, Prism.languages.makefile)
+ }
} else {
code = S(code).unescapeHTML().s
const languages = hljs.listLanguages()