You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge branch 'develop' into sidv/removeDirectiveGrammar
* develop: (31 commits)
chore: Update docs
New Mermaid Live Editor for Confluence Cloud (mermaid-js#4814)
Update link to Discourse theme component (mermaid-js#4811)
Update flowchart.md (mermaid-js#4810)
chore: Update docs
"CSS" instead of "css" in flowchart.md (mermaid-js#4797)
Update CONTRIBUTING.md
Update CONTRIBUTING.md
fix: typos (mermaid-js#4801)
chore: Align with convention
add additional test case
chore(deps): update all patch dependencies
chore(deps): update all minor dependencies
added test case
add sanitize text
Update docs
modifications to generic parser
improvements to parseGenericTypes
Update packages/mermaid/src/diagrams/class/svgDraw.js
return comment
...
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,8 @@ Documentation is necessary for all non bugfix/refactoring changes.
71
71
72
72
Only make changes to files that are in [`/packages/mermaid/src/docs`](packages/mermaid/src/docs)
73
73
74
-
**_DO NOT CHANGE FILES IN `/docs`_**
74
+
**_DO NOT CHANGE FILES IN `/docs` MANUALLY_**
75
+
76
+
The `/docs` folder will be rebuilt and committed as part of a pre-commit hook.
75
77
76
78
[Join our slack community if you want closer contact!](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE)
Copy file name to clipboardexpand all lines: docs/community/development.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ In GitHub, you first **fork** a repository when you are going to make changes an
22
22
23
23
Then you **clone** a copy to your local development machine (e.g. where you code) to make a copy with all the files to work with.
24
24
25
-
[Fork mermaid](https://github.com/mermaid-js/mermaid/fork) to start contributing to the main project and its documentaion, or [search for other repositories](https://github.com/orgs/mermaid-js/repositories).
25
+
[Fork mermaid](https://github.com/mermaid-js/mermaid/fork) to start contributing to the main project and its documentation, or [search for other repositories](https://github.com/orgs/mermaid-js/repositories).
26
26
27
27
[Here is a GitHub document that gives an overview of the process.](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
Copy file name to clipboardexpand all lines: docs/community/docker-development.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ In GitHub, you first **fork** a repository when you are going to make changes an
22
22
23
23
Then you **clone** a copy to your local development machine (e.g. where you code) to make a copy with all the files to work with.
24
24
25
-
[Fork mermaid](https://github.com/mermaid-js/mermaid/fork) to start contributing to the main project and its documentaion, or [search for other repositories](https://github.com/orgs/mermaid-js/repositories).
25
+
[Fork mermaid](https://github.com/mermaid-js/mermaid/fork) to start contributing to the main project and its documentation, or [search for other repositories](https://github.com/orgs/mermaid-js/repositories).
26
26
27
27
[Here is a GitHub document that gives an overview of the process.](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
Copy file name to clipboardexpand all lines: docs/community/newDiagram.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ For instance:
19
19
20
20
#### Store data found during parsing
21
21
22
-
There are some jison specific sub steps here where the parser stores the data encountered when parsing the diagram, this data is later used by the renderer. You can during the parsing call a object provided to the parser by the user of the parser. This object can be called during parsing for storing data.
22
+
There are some jison specific sub steps here where the parser stores the data encountered when parsing the diagram, this data is later used by the renderer. You can during the parsing call an object provided to the parser by the user of the parser. This object can be called during parsing for storing data.
23
23
24
24
```jison
25
25
statement
@@ -35,7 +35,7 @@ In the extract of the grammar above, it is defined that a call to the setTitle m
35
35
> **Note**
36
36
> Make sure that the `parseError` function for the parser is defined and calling `mermaid.parseError`. This way a common way of detecting parse errors is provided for the end-user.
37
37
38
-
For more info look in the example diagram type:
38
+
For more info look at the example diagram type:
39
39
40
40
The `yy` object has the following function:
41
41
@@ -54,15 +54,15 @@ parser.yy = db;
54
54
55
55
### Step 2: Rendering
56
56
57
-
Write a renderer that given the data found during parsing renders the diagram. To look at an example look at sequenceRenderer.js rather then the flowchart renderer as this is a more generic example.
57
+
Write a renderer that given the data found during parsing renders the diagram. To look at an example look at sequenceRenderer.js rather than the flowchart renderer as this is a more generic example.
58
58
59
59
Place the renderer in the diagram folder.
60
60
61
61
### Step 3: Detection of the new diagram type
62
62
63
63
The second thing to do is to add the capability to detect the new diagram to type to the detectType in `diagram-api/detectType.ts`. The detection should return a key for the new diagram type.
64
64
[This key will be used to as the aria roledescription](#aria-roledescription), so it should be a word that clearly describes the diagram type.
65
-
For example, if your new diagram use a UML deployment diagram, a good key would be "UMLDeploymentDiagram" because assistive technologies such as a screen reader
65
+
For example, if your new diagram uses a UML deployment diagram, a good key would be "UMLDeploymentDiagram" because assistive technologies such as a screen reader
66
66
would voice that as "U-M-L Deployment diagram." Another good key would be "deploymentDiagram" because that would be voiced as "Deployment Diagram." A bad key would be "deployment" because that would not sufficiently describe the diagram.
67
67
68
68
Note that the diagram type key does not have to be the same as the diagram keyword chosen for the [grammar](#grammar), but it is helpful if they are the same.
@@ -122,7 +122,7 @@ There are a few features that are common between the different types of diagrams
122
122
- Themes, there is a common way to modify the styling of diagrams in Mermaid.
123
123
- Comments should follow mermaid standards
124
124
125
-
Here some pointers on how to handle these different areas.
125
+
Here are some pointers on how to handle these different areas.
126
126
127
127
## Accessibility
128
128
@@ -140,7 +140,7 @@ See [the definition of aria-roledescription](https://www.w3.org/TR/wai-aria-1.1/
140
140
141
141
### accessible title and description
142
142
143
-
The syntax for accessible titles and descriptions is described in [the Accessibility documenation section.](../config/accessibility.md)
143
+
The syntax for accessible titles and descriptions is described in [the Accessibility documentation section.](../config/accessibility.md)
144
144
145
145
As a design goal, the jison syntax should be similar between the diagrams.
Copy file name to clipboardexpand all lines: docs/config/usage.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ pnpm add mermaid
41
41
42
42
**Hosting mermaid on a web page:**
43
43
44
-
> Note:This topic explored in greater depth in the [User Guide for Beginners](../intro/getting-started.md)
44
+
> Note:This topic is explored in greater depth in the [User Guide for Beginners](../intro/getting-started.md)
45
45
46
46
The easiest way to integrate mermaid on a web page requires two elements:
47
47
@@ -100,7 +100,7 @@ Mermaid can load multiple diagrams, in the same page.
100
100
101
101
## Enabling Click Event and Tags in Nodes
102
102
103
-
A `securityLevel` configuration has to first be cleared. `securityLevel` sets the level of trust for the parsed diagrams and limits click functionality. This was introduce in version 8.2 as a security improvement, aimed at preventing malicious use.
103
+
A `securityLevel` configuration has to first be cleared. `securityLevel` sets the level of trust for the parsed diagrams and limits click functionality. This was introduced in version 8.2 as a security improvement, aimed at preventing malicious use.
104
104
105
105
**It is the site owner's responsibility to discriminate between trustworthy and untrustworthy user-bases and we encourage the use of discretion.**
106
106
@@ -115,13 +115,13 @@ Values:
115
115
-**strict**: (**default**) HTML tags in the text are encoded and click functionality is disabled.
116
116
-**antiscript**: HTML tags in text are allowed (only script elements are removed) and click functionality is enabled.
117
117
-**loose**: HTML tags in text are allowed and click functionality is enabled.
118
-
-**sandbox**: With this security level, all rendering takes place in a sandboxed iframe. This prevent any JavaScript from running in the context. This may hinder interactive functionality of the diagram, like scripts, popups in the sequence diagram, links to other tabs or targets, etc.
118
+
-**sandbox**: With this security level, all rendering takes place in a sandboxed iframe. This prevents any JavaScript from running in the context. This may hinder interactive functionality of the diagram, like scripts, popups in the sequence diagram, links to other tabs or targets, etc.
119
119
120
120
> **Note**
121
121
> This changes the default behaviour of mermaid so that after upgrade to 8.2, unless the `securityLevel` is not changed, tags in flowcharts are encoded as tags and clicking is disabled.
122
122
> **sandbox** security level is still in the beta version.
123
123
124
-
**If you are taking responsibility for the diagram source security you can set the `securityLevel` to a value of your choosing. This allows clicks and tags are allowed.**
124
+
**If you are taking responsibility for the diagram source security you can set the `securityLevel` to a value of your choosing. This allows clicks and tags are allowed.**
125
125
126
126
**To change `securityLevel`, you have to call `mermaid.initialize`:**
-[Mermaid Live Editor for Confluence Cloud](https://marketplace.atlassian.com/apps/1231571/mermaid-live-editor-for-confluence?hosting=cloud&tab=overview)
52
53
-[Mermaid Plugin for Confluence](https://marketplace.atlassian.com/apps/1214124/mermaid-plugin-for-confluence?hosting=server&tab=overview)
Copy file name to clipboardexpand all lines: docs/intro/getting-started.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,7 @@ When writing the .html file, we give two instructions inside the html code to th
103
103
104
104
a. The mermaid code for the diagram we want to create.
105
105
106
-
b. The importing of mermaid library through the `mermaid.esm.mjs` or `mermaid.esm.min.mjs` and the `mermaid.initialize()` call, which dictates the appearance of diagrams and also starts the rendering process.
106
+
b. The importing of mermaid library through the `mermaid.esm.mjs` or `mermaid.esm.min.mjs` and the `mermaid.initialize()` call, which dictates the appearance of diagrams and also starts the rendering process.
107
107
108
108
**a. The embedded mermaid diagram definition inside a `<pre class="mermaid">`:**
109
109
@@ -221,4 +221,4 @@ In this example mermaid.js is referenced in `src` as a separate JavaScript file,
221
221
222
222
**Comments from Knut Sveidqvist, creator of mermaid:**
223
223
224
-
- In early versions of mermaid, the `<script>` tag was invoked in the `<head>` part of the web page. Nowadays we can place it in the `<body>` as seen above. Older parts of the documentation frequently reflects the previous way which still works.
224
+
- In early versions of mermaid, the `<script>` tag was invoked in the `<head>` part of the web page. Nowadays we can place it in the `<body>` as seen above. Older parts of the documentation frequently reflect the previous way which still works.
Copy file name to clipboardexpand all lines: docs/syntax/mindmap.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -58,15 +58,15 @@ mindmap
58
58
59
59
The syntax for creating Mindmaps is simple and relies on indentation for setting the levels in the hierarchy.
60
60
61
-
In the following example you can see how there are 3 different levels. One with starting at the left of the text and another level with two rows starting at the same column, defining the node A. At the end there is one more level where the text is indented further then the previous lines defining the nodes B and C.
61
+
In the following example you can see how there are 3 different levels. One with starting at the left of the text and another level with two rows starting at the same column, defining the node A. At the end there is one more level where the text is indented further than the previous lines defining the nodes B and C.
62
62
63
63
mindmap
64
64
Root
65
65
A
66
66
B
67
67
C
68
68
69
-
In summary is a simple text outline where there are one node at the root level called `Root` which has one child `A`. `A` in turn has two children `B`and `C`. In the diagram below we can see this rendered as a mindmap.
69
+
In summary is a simple text outline where there is one node at the root level called `Root` which has one child `A`. `A` in turn has two children `B`and `C`. In the diagram below we can see this rendered as a mindmap.
70
70
71
71
```mermaid-example
72
72
mindmap
@@ -228,7 +228,7 @@ _These classes need to be supplied by the site administrator._
228
228
229
229
## Unclear indentation
230
230
231
-
The actual indentation does not really matter only compared with the previous rows. If we take the previous example and disrupt it a little we can se how the calculations are performed. Let us start with placing C with a smaller indentation than `B`but larger then `A`.
231
+
The actual indentation does not really matter only compared with the previous rows. If we take the previous example and disrupt it a little we can see how the calculations are performed. Let us start with placing C with a smaller indentation than `B`but larger then `A`.
0 commit comments