packages/mermaid/src/mermaidAPI.ts
File mermaidAPI.ts
has 329 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* This is the API to be used when optionally handling the integration with the web page, instead of
* using the default integration provided by mermaid.js.
*
* The core of this api is the [**render**](Setup.md?id=render) function which, given a graph
Function render
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const render = async function (
id: string,
text: string,
svgContainingElement?: Element
): Promise<RenderResult> {
Function createCssStyles
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const createCssStyles = (
config: MermaidConfig,
classDefs: Record<string, DiagramStyleClassDef> | null | undefined = {}
): string => {
let cssStyles = '';