Skip to content

Commit c1ca351

Browse files
committed
Fix (tmp) for handling of config of htmlLabels ion note. MOvint class box out of flowchart docs
1 parent 953d288 commit c1ca351

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

packages/mermaid/src/rendering-util/rendering-elements/shapes.ts

+6-9
Original file line numberDiff line numberDiff line change
@@ -449,14 +449,6 @@ export const shapesDefs = [
449449
aliases: ['lined-document'],
450450
handler: linedWaveEdgedRect,
451451
},
452-
{
453-
semanticName: 'Class Box',
454-
name: 'Class Box',
455-
shortName: 'classBox',
456-
description: 'Class Box',
457-
aliases: ['class-box'],
458-
handler: classBox,
459-
},
460452
] as const satisfies ShapeDefinition[];
461453

462454
const generateShapeMap = () => {
@@ -477,8 +469,13 @@ const generateShapeMap = () => {
477469
icon,
478470
iconRounded,
479471
imageSquare,
480-
kanbanItem,
481472
anchor,
473+
474+
// Kanban diagram
475+
kanbanItem,
476+
477+
// class diagram
478+
classBox,
482479
} as const;
483480

484481
const entries = [

packages/mermaid/src/rendering-util/rendering-elements/shapes/note.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export async function note<T extends SVGGraphicsElement>(
1313
) {
1414
const { labelStyles, nodeStyles } = styles2String(node);
1515
node.labelStyle = labelStyles;
16-
const useHtmlLabels = node.useHtmlLabels || getConfig().htmlLabels;
16+
const useHtmlLabels = node.useHtmlLabels || getConfig().flowchart?.htmlLabels !== false;
1717
if (!useHtmlLabels) {
1818
node.centerLabel = true;
1919
}

0 commit comments

Comments
 (0)