diff options
Diffstat (limited to 'lib/parse/page.js')
-rw-r--r-- | lib/parse/page.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/parse/page.js b/lib/parse/page.js index efadf82..b6c9994 100644 --- a/lib/parse/page.js +++ b/lib/parse/page.js @@ -23,11 +23,13 @@ function render(section, _options) { // Synchronous highlighting with highlight.js highlight: function (code, lang) { + if(!lang) return code; + try { return hljs.highlight(lang, code).value; - } catch(e) { - return hljs.highlightAuto(code).value; - } + } catch(e) { } + + return code; } }); |