diff --git a/src/highlight.js b/src/highlight.js index e19e29296..670a6e150 100644 --- a/src/highlight.js +++ b/src/highlight.js @@ -166,7 +166,7 @@ export default function (lowlight, defaultStyle) { lowlight.highlight(language, code) : lowlight.highlightAuto(code) ); - if (codeTree.language === null) { + if (codeTree.language === null || language === 'text') { codeTree.value = [{ type: 'text', value: code }]; } const defaultPreStyle = style.hljs || { backgroundColor: '#fff' };