mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-10 01:29:49 +02:00
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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user