@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
- return label.replace(/\\n/g, '\n').trim();
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graph-artifact/core",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Composable Mermaid-like parser, layout engine, and React renderer for interactive diagram artifacts.",
5
5
  "license": "MIT",
6
6
  "repository": {