Merge branch 'sidv/fixLL' of https://github.com/mermaid-js/mermaid into sidv/fixLL

* 'sidv/fixLL' of https://github.com/mermaid-js/mermaid:
  Apply suggestions from code review
This commit is contained in:
Sidharth Vinod 2022-11-09 09:55:09 +05:30
commit c309e3e3d6
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD

View File

@ -27,24 +27,9 @@ export interface Detectors {
*
* Can be used for third-party custom diagrams.
*
* For third-party diagrams that are rarely used, we recommend instead setting
* the `lazyLoadedDiagrams` param in the Mermaid config, as that will instead
* only load the diagram when needed.
*
* @param id - A unique ID for the given diagram.
* @param diagram - The diagram definition.
* @param detector - Function that returns `true` if a given mermaid text is this diagram definition.
*
* @example How to add `@mermaid-js/mermaid-mindmap` to mermaid
*
* ```js
* import {
* diagram as mindmap, detector as mindmapDetector, id as mindmapId
* } from "@mermaid-js/mermaid-mindmap";
* import mermaid from "mermaid";
*
* mermaid.mermaidAPI.registerDiagram(mindmapId, mindmap, mindmapDetector);
* ```
*/
export const registerDiagram = (
id: string,