|
|
@ -84,7 +84,7 @@ define([
|
|
|
|
var defaultCode = renderer.code;
|
|
|
|
var defaultCode = renderer.code;
|
|
|
|
renderer.code = function (code, language) {
|
|
|
|
renderer.code = function (code, language) {
|
|
|
|
if (language === 'mermaid' && code.match(/^(graph|pie|gantt|sequenceDiagram|classDiagram|gitGraph)/)) {
|
|
|
|
if (language === 'mermaid' && code.match(/^(graph|pie|gantt|sequenceDiagram|classDiagram|gitGraph)/)) {
|
|
|
|
return '<pre class="mermaid">'+code+'</pre>';
|
|
|
|
return '<pre class="mermaid">'+Util.fixHTML(code)+'</pre>';
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return defaultCode.apply(renderer, arguments);
|
|
|
|
return defaultCode.apply(renderer, arguments);
|
|
|
|
}
|
|
|
|
}
|
|
|
|