@ktrysmt/beautiful-mermaid 1.4.1 → 1.4.2
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.
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/parser.ts +3 -3
package/dist/index.js
CHANGED
|
@@ -416,7 +416,7 @@ function parseFlowchart(lines) {
|
|
|
416
416
|
const subgraphMatch = line.match(/^subgraph\s+(.+)$/);
|
|
417
417
|
if (subgraphMatch) {
|
|
418
418
|
const rest = subgraphMatch[1].trim();
|
|
419
|
-
const bracketMatch = rest.match(/^([\w-]+)\s*\[(.+)\]$/);
|
|
419
|
+
const bracketMatch = rest.match(/^([\w\p{L}-]+)\s*\[(.+)\]$/u);
|
|
420
420
|
let id;
|
|
421
421
|
let label;
|
|
422
422
|
if (bracketMatch) {
|
|
@@ -424,7 +424,7 @@ function parseFlowchart(lines) {
|
|
|
424
424
|
label = normalizeBrTags(bracketMatch[2]);
|
|
425
425
|
} else {
|
|
426
426
|
label = normalizeBrTags(rest);
|
|
427
|
-
id = rest.replace(/\s+/g, "_").replace(/[^\w]/
|
|
427
|
+
id = rest.replace(/\s+/g, "_").replace(/[^\p{L}\p{N}\w]/gu, "");
|
|
428
428
|
}
|
|
429
429
|
const sg = { id, label, nodeIds: [], children: [] };
|
|
430
430
|
subgraphStack.push(sg);
|