Explorar o código

Disable highlightAuto because it become extreamly slow in some cases

Sotaro KARASAWA %!s(int64=11) %!d(string=hai) anos
pai
achega
4b82280ad9
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      resource/js/crowi.js

+ 4 - 2
resource/js/crowi.js

@@ -128,10 +128,12 @@ Crowi.rendererType.markdown.prototype = {
         var result;
         if (lang) {
           result = hljs.highlight(lang, code);
+          return callback(null, result.value);
         } else {
-          result = hljs.highlightAuto(code);
+          //result = hljs.highlightAuto(code);
+          //callback(null, result.value);
+          return callback(null, code);
         }
-        callback(null, result.value);
       },
       tables: true,
       breaks: true,