Skip to content

Commit

Permalink
Updates after tests
Browse files Browse the repository at this point in the history
  • Loading branch information
knsv committed Jul 25, 2023
1 parent cfbd38d commit 15c6dfc
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 22 deletions.
4 changes: 2 additions & 2 deletions cypress/integration/rendering/flowchart-v2.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ title: Simple flowchart
flowchart TD
A --> B
`,
{ flowchart: { titleTopMargin: 0 } }
{ flowchart: { titleTopMargin: 10 } }
);
});
it('3192: It should be possieble to render flowcharts with invisible edges', () => {
Expand All @@ -682,7 +682,7 @@ title: Simple flowchart with invisible edges
flowchart TD
A ~~~ B
`,
{ flowchart: { titleTopMargin: 0 } }
{ flowchart: { titleTopMargin: 10 } }
);
});
it('4023: Should render html labels with images and-or text correctly', () => {
Expand Down
52 changes: 35 additions & 17 deletions cypress/platform/knsv2.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@
</head>
<body>
<pre id="diagram" class="mermaid">
---
title: Simple flowchart with invisible edges
---
flowchart TD
A ~~~ B
</pre
>
<pre id="diagram" class="mermaid2">
stateDiagram-v2
[*] --> Still
Still --> [*]
Expand All @@ -73,7 +81,7 @@
a1 -- l2 --> a2
end
</pre>
<pre id="diagram" class="mermaid">
<pre id="diagram" class="mermaid2">
flowchart RL
subgraph "`one`"
a1 -- l1 --> a2
Expand All @@ -98,11 +106,11 @@
way`"]
</pre
>
<pre id="diagram" class="mermaid">
<pre id="diagram" class="mermaid2">
classDiagram-v2
note "I love this diagram!\nDo you love it?"
</pre>
<pre id="diagram" class="mermaid">
<pre id="diagram" class="mermaid2">
stateDiagram-v2
State1: The state with a note with minus - and plus + in it
note left of State1
Expand Down Expand Up @@ -147,7 +155,7 @@
शान्तिः سلام 和平 `"]

</pre>
<pre id="diagram" class="mermaid">
<pre id="diagram" class="mermaid2">
%%{init: {"flowchart": {"defaultRenderer": "elk"}} }%%
flowchart TB
%% I could not figure out how to use double quotes in labels in Mermaid
Expand Down Expand Up @@ -399,21 +407,31 @@
mermaid.parseError = function (err, hash) {
// console.error('Mermaid error: ', err);
};
// mermaid.initialize({
// // theme: 'forest',
// startOnLoad: true,
// logLevel: 0,
// flowchart: {
// // defaultRenderer: 'elk',
// useMaxWidth: false,
// // htmlLabels: false,
// htmlLabels: true,
// },
// // htmlLabels: false,
// gantt: {
// useMaxWidth: false,
// },
// useMaxWidth: false,
// });
mermaid.initialize({
// theme: 'forest',
startOnLoad: true,
logLevel: 0,
flowchart: {
// defaultRenderer: 'elk',
useMaxWidth: false,
// htmlLabels: false,
htmlLabels: true,
},
// htmlLabels: false,
gantt: {
useMaxWidth: false,
flowchart: { titleTopMargin: 10 },
fontFamily: 'courier',
sequence: {
actorFontFamily: 'courier',
noteFontFamily: 'courier',
messageFontFamily: 'courier',
},
useMaxWidth: false,
fontSize: 16,
});
function callback() {
alert('It worked');
Expand Down
2 changes: 1 addition & 1 deletion packages/mermaid-zenuml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
],
"license": "MIT",
"dependencies": {
"@zenuml/core": "^3.0.0"
"@zenuml/core": "^3.0.3"
},
"devDependencies": {
"mermaid": "workspace:^"
Expand Down
2 changes: 1 addition & 1 deletion packages/mermaid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mermaid",
"version": "10.2.4",
"version": "10.4.0",
"description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
"type": "module",
"module": "./dist/mermaid.core.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/mermaid/src/diagrams/mindmap/parser/mindmap.jison
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"[" { this.begin('NODE');return 'NODE_DSTART'; }
[\s]+ return 'SPACELIST' /* skip all whitespace */ ;
// !(-\() return 'NODE_ID';
[^\(\[\n\-\)\{\}]+ return 'NODE_ID';
[^\(\[\n\)\{\}]+ return 'NODE_ID';
<<EOF>> return 'EOF';
<NODE>["][`] { this.begin("NSTR2");}
<NSTR2>[^`"]+ { return "NODE_DESCR";}
Expand Down

0 comments on commit 15c6dfc

Please sign in to comment.