Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getDiagram(title, input, callback) {
try {
mermaidAPI.initialize({
startOnLoad: true
});
mermaidAPI.parseError = function(err, hash) {
// console.log("parseError");
// console.log(err.messsage);
};
// console.log("Rendering");
// console.log(input);
// mermaidAPI.render(title, "graph TB;Loading;", diagram => {
// console.log("Rendered");
// setTimeout(
// () =>
// mermaidAPI.render(title, input, diagram => {
// console.log("Rendered");
// console.log(diagram);
// callback(diagram);
// }),
// 200
// );