Skip to content

Commit

Permalink
allow passing text as language
Browse files Browse the repository at this point in the history
  • Loading branch information
conorhastings committed Oct 26, 2017
1 parent ca2b368 commit 3768f3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/highlight.js
Expand Up @@ -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' };
Expand Down

0 comments on commit 3768f3d

Please sign in to comment.