Update 8.6.0_docs.md

This commit is contained in:
Neil Cuzon
2020-07-23 18:33:11 -07:00
committed by GitHub
parent c6a1f42c44
commit 52c30e588c

View File

@@ -42,9 +42,9 @@ Implementors can only modify configurations using directives, but cannot change
# Modifying Configurations and directives: # Modifying Configurations and directives:
The Two types of directives: are “init” or “initialize” and “wrap”. The Two types of directives: are “init” or “initialize” and “wrap”.
**Notes**: All directives are enclosed in %%{ }%%. **Notes**: All directives are enclosed in `%%{ }%%.`
Older versions of mermaid will not parse directives because %% will comment out the directive. Older versions of mermaid will not parse directives because `%%` will comment out the directive.
# Init # Init
init, or initialize: the init or initialize directive gives the user the ability to overwrite and change the values for configuration parameters, with respect to the secure array that is in effect. init, or initialize: the init or initialize directive gives the user the ability to overwrite and change the values for configuration parameters, with respect to the secure array that is in effect.
@@ -55,17 +55,18 @@ init, or initialize: the init or initialize directive gives the user the ability
**Notes:** **Notes:**
init would be an argument-directive: %%{init: { **insert argument here**}}%% init would be an argument-directive: `%%{init: { **insert argument here**}}%%`
The json object that is passed as {**argument** } must be valid, quoted json or it will be ignored. The json object that is passed as {**argument** } must be valid, quoted json or it will be ignored.
**for example**: **for example**:
%%{init: {"theme": default, "logLevel": 1 }}%% `%%{init: {"theme": default, "logLevel": 1 }}%%`
Configurations that are passed through init cannot change the parameters in secure arrays of higher levels. In the event of a conflict, mermaid will give priority to secure arrays and parse the request, without changing the values of the parameters in conflict. Configurations that are passed through init cannot change the parameters in secure arrays of higher levels. In the event of a conflict, mermaid will give priority to secure arrays and parse the request, without changing the values of the parameters in conflict.
When deployed within code, init is called before the graph/diagram description. When deployed within code, init is called before the graph/diagram description.
**for example**: **for example**:
```
%%{init: {"theme": "default", "logLevel": 1 }}%% %%{init: {"theme": "default", "logLevel": 1 }}%%
graph LR graph LR
a-->b a-->b
@@ -75,7 +76,7 @@ When deployed within code, init is called before the graph/diagram description.
e-->f e-->f
f-->g f-->g
g--> g-->
```
# Wrap # Wrap
| Parameter | Description |Type | Required | Values| | Parameter | Description |Type | Required | Values|
| --- | --- | --- | --- | --- | | --- | --- | --- | --- | --- |
@@ -89,7 +90,7 @@ wrap respects manually added <br\> so if the user wants to break up their text,
It is a non-argument directive and can be executed thusly: It is a non-argument directive and can be executed thusly:
%%{wrap}%%. `%%{wrap}%%` .
**an example of text wrapping in a sequence diagram**: **an example of text wrapping in a sequence diagram**: