diff options
author | Evan Read <eread@gitlab.com> | 2019-08-02 05:54:32 +0000 |
---|---|---|
committer | GitLab Release Tools Bot <delivery-team+release-tools@gitlab.com> | 2019-08-05 15:38:34 +0000 |
commit | cee949bd62a614b471430c971d03b5fe6a48a39c (patch) | |
tree | a964ae01c147bfea5b2ca03fbade4b01afe46c75 /doc | |
parent | 98fd0ec841719ed506d76f492a34ca829d1f062c (diff) | |
download | gitlab-ce-cee949bd62a614b471430c971d03b5fe6a48a39c.tar.gz |
Merge branch 'sh-mermaid-subgraph-docs' into 'master'
Document required quotes in Mermaid subgraph titles
Closes #65338
See merge request gitlab-org/gitlab-ce!31312
(cherry picked from commit ef19202c16fd333f0a45e5f0e3c56d1b2089eae4)
8f9b2fcc Document required quotes in Mermaid subgraph titles
Diffstat (limited to 'doc')
-rw-r--r-- | doc/user/markdown.md | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/doc/user/markdown.md b/doc/user/markdown.md index 96e74125801..b83a466fd7f 100644 --- a/doc/user/markdown.md +++ b/doc/user/markdown.md @@ -185,6 +185,49 @@ graph TD; C-->D; ``` +#### Subgraphs + +NOTE: **Note:** GitLab 12.1 and up now [requires quotes around subgraph +titles that contain multiple words](https://github.com/knsv/mermaid/pull/845). + +Subgraphs can also be included: + +~~~ +```mermaid +graph TB + + SubGraph1 --> SubGraph1Flow + subgraph "SubGraph 1 Flow" + SubGraph1Flow(SubNode 1) + SubGraph1Flow -- Choice1 --> DoChoice1 + SubGraph1Flow -- Choice2 --> DoChoice2 + end + + subgraph "Main Graph" + Node1[Node 1] --> Node2[Node 2] + Node2 --> SubGraph1[Jump to SubGraph1] + SubGraph1 --> FinalThing[Final Thing] +end +``` +~~~ + +```mermaid +graph TB + + SubGraph1 --> SubGraph1Flow + subgraph "SubGraph 1 Flow" + SubGraph1Flow(SubNode 1) + SubGraph1Flow -- Choice1 --> DoChoice1 + SubGraph1Flow -- Choice2 --> DoChoice2 + end + + subgraph "Main Graph" + Node1[Node 1] --> Node2[Node 2] + Node2 --> SubGraph1[Jump to SubGraph1] + SubGraph1 --> FinalThing[Final Thing] +end +``` + ### Emoji > If this is not rendered correctly, [view it in GitLab itself](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#emoji). |