-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow architecture diagrams to support any character for titles
Architecture diagrams with Markdown
- Loading branch information
Showing
8 changed files
with
266 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ <h2>Simple diagram with groups</h2> | |
service disk1(disk)[Storage] in api | ||
service disk2(disk)[Storage] in api | ||
service server(server)[Server] in api | ||
service gateway(internet)[Gateway] | ||
service gateway(internet)[Gateway] | ||
|
||
db:L -- R:server | ||
disk1:T -- B:server | ||
|
@@ -226,13 +226,52 @@ <h2>Junction Demo Groups</h2> | |
</pre> | ||
<hr /> | ||
|
||
<h2>Unicode</h2> | ||
<pre class="mermaid"> | ||
architecture-beta | ||
service left_disk(disk)["[email protected]"] | ||
service right_disk(disk)["❤ Disk"] | ||
|
||
left_disk:R -- L:right_disk | ||
</pre> | ||
<hr /> | ||
|
||
<h2>Markdown</h2> | ||
<pre class="mermaid"> | ||
architecture-beta | ||
service left_disk(disk)["`This **is** _Markdown_`"] | ||
service right_disk(disk)["`Line1 | ||
Line 2 | ||
Line 3`"] | ||
|
||
left_disk:R -- L:right_disk | ||
</pre> | ||
<hr /> | ||
|
||
<h2>Katex</h2> | ||
<pre class="mermaid"> | ||
architecture-beta | ||
service left_disk(disk)["`$$f(\relax{x}) = \int_{-\infty}^\infty \hat{f}(\xi)\,e^{2 \pi i \xi x}\,d\xi$$`"] | ||
service center_disk(disk)["`$$\Bigg(\bigg(\Big(\big((\frac{-b\pm\sqrt{b^2-4ac}}{2a})\big)\Big)\bigg)\Bigg)$$`"] | ||
service right_disk(disk)["`$$1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots}}}}$$`"] | ||
|
||
left_disk:R -- L:center_disk | ||
center_disk:R -- L:right_disk | ||
</pre> | ||
<hr /> | ||
|
||
<h2>External Icons Demo</h2> | ||
<pre class="mermaid"> | ||
architecture-beta | ||
service s3(logos:aws-s3)[Cloud Store] | ||
service ec2(logos:aws-ec2)[Server] | ||
service api(logos:aws-api-gateway)[Api Gateway] | ||
service fa(fa:image)[Font Awesome Icon] | ||
|
||
api:L -- R:ec2 | ||
api:B -- T:s3 | ||
fa:L -- R:s3 | ||
fa:T -- B:ec2 | ||
</pre> | ||
|
||
<script type="module"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -307,3 +307,7 @@ test('markdownToHTML - auto wrapping', () => { | |
) | ||
).toMatchInlineSnapshot('"<p>Hello, how do<br/>you do?</p>"'); | ||
}); | ||
|
||
test('markdownToHTML - email address', () => { | ||
expect(markdownToHTML(`[email protected]`)).toMatchInlineSnapshot('"<p>[email protected]</p>"'); | ||
Check failure on line 312 in packages/mermaid/src/rendering-util/handle-markdown-text.spec.ts GitHub Actions / unit-testpackages/mermaid/src/rendering-util/handle-markdown-text.spec.ts > markdownToHTML - email address
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.