mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-24 11:26:31 +00:00
Merge pull request #104 from GitbookIO/fix/auto_highlighting
Disable automatic highlighting
This commit is contained in:
+5
-3
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user