Fixed parsers to use the correct type name in close_directive

Added directive support to pie
(Refactored pie parsing to be a bit more clear)
Added more unit tests to pie
This commit is contained in:
chris moran
2020-07-27 13:24:23 -04:00
parent b9fa2f4125
commit 771bf78576
15 changed files with 134 additions and 37 deletions

View File

@@ -2,10 +2,16 @@
*
*/
import { logger } from '../../logger';
import mermaidAPI from '../../mermaidAPI';
import configApi from '../../config';
let sections = {};
let title = '';
export const parseDirective = function(statement, context, type) {
mermaidAPI.parseDirective(this, statement, context, type);
};
const addSection = function(id, value) {
if (typeof sections[id] === 'undefined') {
sections[id] = value;
@@ -39,6 +45,8 @@ const clear = function() {
// }
export default {
parseDirective,
getConfig: () => configApi.getConfig().pie,
addSection,
getSections,
cleanupValue,