Refactored rendering sequence diagrams

This commit is contained in:
Chris Moran
2020-06-17 05:54:24 -04:00
parent fd7dbaf0a7
commit 3c72d28511
17 changed files with 1334 additions and 930 deletions

View File

@@ -6,6 +6,8 @@
import decode from 'entity-decode/browser';
import mermaidAPI from './mermaidAPI';
import { logger } from './logger';
import utils from './utils';
/**
* ## init
* Function that goes through the document to find the chart definitions in there and render them.
@@ -98,6 +100,11 @@ const init = function() {
.trim()
.replace(/<br\s*\/?>/gi, '<br/>');
const init = utils.detectInit(txt);
if (init) {
logger.debug('Detected early reinit: ', init);
}
try {
mermaidAPI.render(
id,