We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15a1ac8 commit ac4acabCopy full SHA for ac4acab
lib/markdown/highlight.js
@@ -1,11 +1,15 @@
1
const chalk = require('chalk')
2
const prism = require('prismjs')
3
const loadLanguages = require('prismjs/components/index')
4
+const escapeHtml = require('escape-html')
5
6
// required to make embedded highlighting work...
7
loadLanguages(['markup', 'css', 'javascript'])
8
9
function wrap (code, lang) {
10
+ if (lang === 'text') {
11
+ code = escapeHtml(code)
12
+ }
13
return `<pre v-pre class="language-${lang}"><code>${code}</code></pre>`
14
}
15
0 commit comments