From 52610d7d61d30d77bb6aaddf68c6fdfe1f5c6ae1 Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Wed, 16 Apr 2014 13:15:35 -0700 Subject: [PATCH] Disable automatic highlighting Fallback to no highlighting rather that potentially funky highlighting --- lib/parse/page.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/parse/page.js b/lib/parse/page.js index efadf824a..b6c99942c 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; } });