From bed95c77a982a247bee7a4e38c43cfd480e14f5b Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Fri, 14 Oct 2022 10:01:32 +0200 Subject: [PATCH] Some changes in the docs for mindmap --- .gitignore | 2 ++ docs/mindmap.md | 8 +++----- packages/mermaid/src/docs/mindmap.md | 7 +++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 6e4fe723a..33718aaf7 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,5 @@ cypress/snapshots/ .eslintcache .tsbuildinfo tsconfig.tsbuildinfo + +local*.html diff --git a/docs/mindmap.md b/docs/mindmap.md index 94baf43e0..32f1e099d 100644 --- a/docs/mindmap.md +++ b/docs/mindmap.md @@ -26,7 +26,6 @@ mindmap Tools Pen and paper Mermaid - ``` ```mermaid @@ -47,14 +46,13 @@ mindmap Tools Pen and paper Mermaid - ``` ## Syntax The syntax for creating Mindmaps is simple and relies on indentation for setting the levels in the hierarchy. -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. +In the following example you can see how there are 3 different levels of indentation. The leftmost indentation is the root of the mindmap. There can only be one root and if you by misstake add two of them on the same level there will be a syntax error. Rows with larger indentation will be connected as children to the previous row with lower indentation. Based on that you can see in the example how the nodes B and C both are children to node A whci in turn is a child of the node Root. mindmap Root @@ -62,7 +60,7 @@ In the following example you can see how there are 3 different levels. One with B C -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. +In the diagram below you can see the example rendered as a mindmap. ```mermaid-example mindmap @@ -220,7 +218,7 @@ The actual indentation does not really matter only compared with the previous ro B C -This outline is unclear as `B` clearly is a child of `A` but when we move on to `C` the clarity is lost. `C` is not a child of `B` with a higher indentation nor does it have the same indentation as `B`. The only thing that is clear is that the first node with smaller indentation, indicating a parent, is A. Then Mermaid relies on this known truth and compensates for the unclear indentation and selects `A` as a parent of `C` leading till the same diagram with `B` and `C` as siblings. +This outline is unclear as `B` clearly is a child of `A` but when we move on to `C` the clarity is lost. `C` is not a child of `B` with a higher indentation nor does it have the same indentation as `B`. The only thing that is clear is that the first node with smaller indentation, indicating a parent, is A. Mermaid will rely on this known truth and compensates for the unclear indentation and selects `A` as a parent of `C` leading till the same diagram with `B` and `C` as siblings. ```mermaid-example mindmap diff --git a/packages/mermaid/src/docs/mindmap.md b/packages/mermaid/src/docs/mindmap.md index af7a3df85..5aa6f4953 100644 --- a/packages/mermaid/src/docs/mindmap.md +++ b/packages/mermaid/src/docs/mindmap.md @@ -24,14 +24,13 @@ mindmap Tools Pen and paper Mermaid - ``` ## Syntax The syntax for creating Mindmaps is simple and relies on indentation for setting the levels in the hierarchy. -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. +In the following example you can see how there are 3 different levels of indentation. The leftmost indentation is the root of the mindmap. There can only be one root and if you by misstake add two of them on the same level there will be a syntax error. Rows with larger indentation will be connected as children to the previous row with lower indentation. Based on that you can see in the example how the nodes B and C both are children to node A whci in turn is a child of the node Root. ``` mindmap @@ -41,7 +40,7 @@ mindmap C ``` -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. +In the diagram below you can see the example rendered as a mindmap. ```mermaid mindmap @@ -145,7 +144,7 @@ mindmap C ``` -This outline is unclear as `B` clearly is a child of `A` but when we move on to `C` the clarity is lost. `C` is not a child of `B` with a higher indentation nor does it have the same indentation as `B`. The only thing that is clear is that the first node with smaller indentation, indicating a parent, is A. Then Mermaid relies on this known truth and compensates for the unclear indentation and selects `A` as a parent of `C` leading till the same diagram with `B` and `C` as siblings. +This outline is unclear as `B` clearly is a child of `A` but when we move on to `C` the clarity is lost. `C` is not a child of `B` with a higher indentation nor does it have the same indentation as `B`. The only thing that is clear is that the first node with smaller indentation, indicating a parent, is A. Mermaid will rely on this known truth and compensates for the unclear indentation and selects `A` as a parent of `C` leading till the same diagram with `B` and `C` as siblings. ```mermaid mindmap