Commit 8cf3f6f0 authored by NGPixel's avatar NGPixel Committed by Nicolas Giard

feat: code colorize option support

parent 168e2e87
......@@ -25,7 +25,7 @@ var mkdown = md({
linkify: true,
typography: true,
highlight(str, lang) {
if (lang && hljs.getLanguage(lang)) {
if (appconfig.theme.code.colorize && lang && hljs.getLanguage(lang)) {
try {
return '<pre class="hljs"><code>' + hljs.highlight(lang, str, true).value + '</code></pre>'
} catch (err) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment