mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Apply suggested style from code review
Co-authored-by: Sidharth Vinod <sidharthv96@gmail.com>
This commit is contained in:
parent
692a7471c1
commit
e86f09aaed
@ -1,17 +1,16 @@
|
||||
import type { Pie } from 'mermaid-parser';
|
||||
import { parse } from 'mermaid-parser';
|
||||
|
||||
import { log } from '../../logger.js';
|
||||
import type { ParserDefinition } from '../../diagram-api/types.js';
|
||||
import { populateCommonDb } from '../common/populateCommonDb.js';
|
||||
import type { PieDB } from './pieTypes.js';
|
||||
import { db } from './pieDb.js';
|
||||
|
||||
function populateDb(ast: Pie, db: PieDB) {
|
||||
const populateDb = (ast: Pie, db: PieDB) => {
|
||||
populateCommonDb(ast, db);
|
||||
db.setShowData(ast.showData);
|
||||
ast.sections.map(db.addSection);
|
||||
}
|
||||
};
|
||||
|
||||
export const parser: ParserDefinition = {
|
||||
parse: (input: string): void => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user