Skip to content

Commit

Permalink
chore: Add dummy parseDirective back in injectUtils.
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Aug 22, 2023
1 parent 47301ac commit 95b837e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/mermaid/src/diagram-api/diagramAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ export const registerDiagram = (
getConfig,
sanitizeText,
setupGraphViewbox,
getCommonDb()
getCommonDb(),
() => {
// parseDirective is removed. This is a no-op for legacy support.
}
);
};

Expand Down
4 changes: 3 additions & 1 deletion packages/mermaid/src/diagram-api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export interface InjectUtils {
_sanitizeText: any;
_setupGraphViewbox: any;
_commonDb: any;
_parseDirective: any;
}

/**
Expand Down Expand Up @@ -44,7 +45,8 @@ export interface DiagramDefinition {
_getConfig: InjectUtils['_getConfig'],
_sanitizeText: InjectUtils['_sanitizeText'],
_setupGraphViewbox: InjectUtils['_setupGraphViewbox'],
_commonDb: InjectUtils['_commonDb']
_commonDb: InjectUtils['_commonDb'],
_parseDirective: InjectUtils['_parseDirective']
) => void;
}

Expand Down

0 comments on commit 95b837e

Please sign in to comment.