From c1ca3511c4428cdb4643b6ebc7a047a190d473de Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Wed, 30 Oct 2024 11:54:31 +0100 Subject: [PATCH] Fix (tmp) for handling of config of htmlLabels ion note. MOvint class box out of flowchart docs --- .../rendering-util/rendering-elements/shapes.ts | 15 ++++++--------- .../rendering-elements/shapes/note.ts | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/packages/mermaid/src/rendering-util/rendering-elements/shapes.ts b/packages/mermaid/src/rendering-util/rendering-elements/shapes.ts index 4f6459d85..dbfc93677 100644 --- a/packages/mermaid/src/rendering-util/rendering-elements/shapes.ts +++ b/packages/mermaid/src/rendering-util/rendering-elements/shapes.ts @@ -449,14 +449,6 @@ export const shapesDefs = [ aliases: ['lined-document'], handler: linedWaveEdgedRect, }, - { - semanticName: 'Class Box', - name: 'Class Box', - shortName: 'classBox', - description: 'Class Box', - aliases: ['class-box'], - handler: classBox, - }, ] as const satisfies ShapeDefinition[]; const generateShapeMap = () => { @@ -477,8 +469,13 @@ const generateShapeMap = () => { icon, iconRounded, imageSquare, - kanbanItem, anchor, + + // Kanban diagram + kanbanItem, + + // class diagram + classBox, } as const; const entries = [ diff --git a/packages/mermaid/src/rendering-util/rendering-elements/shapes/note.ts b/packages/mermaid/src/rendering-util/rendering-elements/shapes/note.ts index dfad92949..4a7f66a87 100644 --- a/packages/mermaid/src/rendering-util/rendering-elements/shapes/note.ts +++ b/packages/mermaid/src/rendering-util/rendering-elements/shapes/note.ts @@ -13,7 +13,7 @@ export async function note( ) { const { labelStyles, nodeStyles } = styles2String(node); node.labelStyle = labelStyles; - const useHtmlLabels = node.useHtmlLabels || getConfig().htmlLabels; + const useHtmlLabels = node.useHtmlLabels || getConfig().flowchart?.htmlLabels !== false; if (!useHtmlLabels) { node.centerLabel = true; }