support 'text' language for no syntax highlighting (#875)

This commit is contained in:
Endilie Yacop Sucipto 2018-07-28 00:55:27 +07:00 committed by GitHub
parent 75538395be
commit a6db22b6ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,6 +28,9 @@ class MarkdownRenderer {
highlight(str, lang) {
lang =
lang || (siteConfig.highlight && siteConfig.highlight.defaultLang);
if (lang === 'text') {
return str;
}
if (lang) {
try {
if (