Skip to content

Commit

Permalink
remove populateInfoDb.ts and add it into infoParser.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Yokozuna59 committed Aug 16, 2023
1 parent e0172d6 commit f5c33c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
8 changes: 7 additions & 1 deletion packages/mermaid/src/diagrams/info/infoParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ import { parse } from 'mermaid-parser';

import { log } from '../../logger.js';
import type { ParserDefinition } from '../../diagram-api/types.js';
import { populateDb } from './populateInfoDb.js';
import type { InfoDB } from './infoTypes.js';
import { db } from './infoDb.js';
import { populateDb as populateCommonDb } from '../common/populateCommonDb.js';

function populateDb(ast: Info, db: InfoDB) {
populateCommonDb(ast, db);
ast.version && db.setVersion(ast.version);
}

export const parser: ParserDefinition = {
parse: (input: string): void => {
Expand Down
9 changes: 0 additions & 9 deletions packages/mermaid/src/diagrams/info/populateInfoDb.ts

This file was deleted.

0 comments on commit f5c33c3

Please sign in to comment.