mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-10 09:39:38 +02:00
Updated pie parsing with the new syntax + fix for flowDb
This commit is contained in:
@@ -2,6 +2,13 @@ import { log } from '../../logger';
|
||||
import mermaidAPI from '../../mermaidAPI';
|
||||
import * as configApi from '../../config';
|
||||
import common from '../common/common';
|
||||
import {
|
||||
setTitle,
|
||||
getTitle,
|
||||
getAccDescription,
|
||||
setAccDescription,
|
||||
clear as commonClear,
|
||||
} from '../../commonDb';
|
||||
|
||||
let sections = {};
|
||||
let title = '';
|
||||
@@ -21,10 +28,6 @@ const addSection = function (id, value) {
|
||||
};
|
||||
const getSections = () => sections;
|
||||
|
||||
const setTitle = function (txt) {
|
||||
title = common.sanitizeText(txt, configApi.getConfig());
|
||||
};
|
||||
|
||||
const setShowData = function (toggle) {
|
||||
showData = toggle;
|
||||
};
|
||||
@@ -33,18 +36,6 @@ const getShowData = function () {
|
||||
return showData;
|
||||
};
|
||||
|
||||
const getTitle = function () {
|
||||
return title;
|
||||
};
|
||||
|
||||
const setAccDescription = function (txt) {
|
||||
description = common.sanitizeText(txt, configApi.getConfig());
|
||||
};
|
||||
|
||||
const getAccDescription = function () {
|
||||
return description;
|
||||
};
|
||||
|
||||
const cleanupValue = function (value) {
|
||||
if (value.substring(0, 1) === ':') {
|
||||
value = value.substring(1).trim();
|
||||
@@ -58,10 +49,8 @@ const clear = function () {
|
||||
sections = {};
|
||||
title = '';
|
||||
showData = false;
|
||||
commonClear();
|
||||
};
|
||||
// export const parseError = (err, hash) => {
|
||||
// global.mermaidAPI.parseError(err, hash)
|
||||
// }
|
||||
|
||||
export default {
|
||||
parseDirective,
|
||||
@@ -76,5 +65,4 @@ export default {
|
||||
getShowData,
|
||||
getAccDescription,
|
||||
setAccDescription,
|
||||
// parseError
|
||||
};
|
||||
|
Reference in New Issue
Block a user