Browse Source

feat: code colorize option support

pull/166/head
NGPixel 7 years ago
committed by Nicolas Giard
parent
commit
8cf3f6f066
1 changed files with 1 additions and 1 deletions
  1. 2
      server/libs/markdown.js

2
server/libs/markdown.js

@ -25,7 +25,7 @@ var mkdown = md({
linkify: true, linkify: true,
typography: true, typography: true,
highlight(str, lang) { highlight(str, lang) {
if (lang && hljs.getLanguage(lang)) {
if (appconfig.theme.code.colorize && lang && hljs.getLanguage(lang)) {
try { try {
return '<pre class="hljs"><code>' + hljs.highlight(lang, str, true).value + '</code></pre>' return '<pre class="hljs"><code>' + hljs.highlight(lang, str, true).value + '</code></pre>'
} catch (err) { } catch (err) {

Loading…
Cancel
Save