mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-20 15:59:51 +02:00
Removed warnings in the grammar oand some console logging
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/** Created by knut on 15-01-14. */
|
||||
import { sanitizeText, getConfig } from '../../diagram-api/diagramAPI';
|
||||
import { log } from '../../logger';
|
||||
import { log as _log } from '../../logger';
|
||||
|
||||
let nodes = [];
|
||||
let cnt = 0;
|
||||
@@ -25,7 +25,7 @@ export const getMindmap = () => {
|
||||
return nodes.length > 0 ? nodes[0] : null;
|
||||
};
|
||||
export const addNode = (level, id, descr, type) => {
|
||||
console.info('addNode', level, id, descr, type);
|
||||
log.info('addNode', level, id, descr, type);
|
||||
const conf = getConfig();
|
||||
const node = {
|
||||
id: cnt++,
|
||||
@@ -132,7 +132,8 @@ export const type2Str = (type) => {
|
||||
return 'no-border';
|
||||
}
|
||||
};
|
||||
|
||||
// Expose logger to grammar
|
||||
export const log = _log;
|
||||
export const getNodeById = (id) => nodes[id];
|
||||
export const getElementById = (id) => elements[id];
|
||||
// export default {
|
||||
|
Reference in New Issue
Block a user