Fix highlighting in code blocks for markdown rendering
parent
881976d0ba
commit
3676a6b923
|
@ -75,11 +75,12 @@ define([
|
|||
|
||||
var mediaMap = {};
|
||||
|
||||
var defaultCode = renderer.code;
|
||||
renderer.code = function (code, language) {
|
||||
if (language === 'mermaid' && (code.match(/^sequenceDiagram/) || code.match(/^graph/))) {
|
||||
return '<pre class="mermaid">'+code+'</pre>';
|
||||
} else {
|
||||
return '<pre><code>'+code+'</code></pre>';
|
||||
return defaultCode.apply(renderer, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue