From 028ef2abb2e45d077eef6785d5df7c611cb26deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Luba=C5=84ski?= Date: Tue, 1 Sep 2020 10:02:12 +0200 Subject: [PATCH] fix: add missing argument for highlighting code --- src/core/render/compiler/code.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/render/compiler/code.js b/src/core/render/compiler/code.js index da470d78f..2aa14debb 100644 --- a/src/core/render/compiler/code.js +++ b/src/core/render/compiler/code.js @@ -3,11 +3,12 @@ import Prism from 'prismjs'; import 'prismjs/components/prism-markup-templating'; export const highlightCodeCompiler = ({ renderer }) => - (renderer.code = function(code, lang = '') { + (renderer.code = function(code, lang = 'markup') { const langOrMarkup = Prism.languages[lang] || Prism.languages.markup; const text = Prism.highlight( code.replace(/@DOCSIFY_QM@/g, '`'), - langOrMarkup + langOrMarkup, + lang ); return `
${text}
`;