Update to change makefile syntax highlighting to Prism
This commit is contained in:
parent
a3cdc5ba80
commit
b2985085d0
1 changed files with 6 additions and 0 deletions
|
@ -7,6 +7,7 @@ require('prismjs/components/prism-haskell')
|
||||||
require('prismjs/components/prism-go')
|
require('prismjs/components/prism-go')
|
||||||
require('prismjs/components/prism-typescript')
|
require('prismjs/components/prism-typescript')
|
||||||
require('prismjs/components/prism-jsx')
|
require('prismjs/components/prism-jsx')
|
||||||
|
require('prismjs/components/prism-makefile')
|
||||||
|
|
||||||
import Prism from 'prismjs'
|
import Prism from 'prismjs'
|
||||||
import hljs from 'highlight.js'
|
import hljs from 'highlight.js'
|
||||||
|
@ -516,6 +517,11 @@ export function finishView (view) {
|
||||||
result = {
|
result = {
|
||||||
value: Prism.highlight(code, Prism.languages.wiki)
|
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 {
|
} else {
|
||||||
code = S(code).unescapeHTML().s
|
code = S(code).unescapeHTML().s
|
||||||
const languages = hljs.listLanguages()
|
const languages = hljs.listLanguages()
|
||||||
|
|
Loading…
Reference in a new issue