Fixed an issue with flowchart rendering. Remember to render html, securityLevel='loose' must be set by the siteConfig. The default securityLevel as of now is 'strict'. This causes html to be url encoded.

This commit is contained in:
chris moran
2020-07-27 05:29:21 -04:00
parent c8f652aaa8
commit 38d4b5be1a
19 changed files with 1258 additions and 833 deletions

View File

@@ -1,8 +1,8 @@
import { select } from 'd3';
import { logger } from '../../logger'; // eslint-disable-line
import utils from '../../utils';
import { getConfig } from '../../config';
import common from '../common/common';
import mermaidAPI from '../../mermaidAPI';
// const MERMAID_DOM_ID_PREFIX = 'mermaid-dom-id-';
const MERMAID_DOM_ID_PREFIX = '';
@@ -20,6 +20,10 @@ let direction;
// Functions to be run after graph rendering
let funs = [];
export const parseDirective = function(statement, context, type) {
mermaidAPI.parseDirective(statement, context, type);
};
/**
* Function called by parser when a node definition has been found
* @param id
@@ -617,6 +621,7 @@ const destructLink = (_str, _startStr) => {
};
export default {
parseDirective,
addVertex,
addLink,
updateLinkInterpolate,