@graph-artifact/core 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,7 +13,13 @@ const invisibleHandle = {
|
|
|
13
13
|
pointerEvents: 'none',
|
|
14
14
|
};
|
|
15
15
|
function normalizeLabelMarkdown(label) {
|
|
16
|
-
|
|
16
|
+
// Mermaid treats "\n" inside labels as a hard line break.
|
|
17
|
+
// react-markdown doesn't always preserve raw newlines, so force
|
|
18
|
+
// CommonMark hard-breaks by adding two trailing spaces.
|
|
19
|
+
return label
|
|
20
|
+
.replace(/\\n/g, '\n')
|
|
21
|
+
.trim()
|
|
22
|
+
.replace(/\n/g, ' \n');
|
|
17
23
|
}
|
|
18
24
|
/**
|
|
19
25
|
* Generates evenly-spaced handle positions across a face.
|