mirror of
https://github.com/SebastianStork/kita.git
synced 2026-01-21 14:31:35 +01:00
feat: mermaid shortcode support code block inside
This commit is contained in:
parent
aa98b6e5e2
commit
64580f4df0
2 changed files with 42 additions and 11 deletions
|
|
@ -134,6 +134,18 @@ Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and ot
|
||||||
## Mermaid
|
## Mermaid
|
||||||
|
|
||||||
{% mermaid() %}
|
{% mermaid() %}
|
||||||
|
|
||||||
|
graph TD;
|
||||||
|
A-->B;
|
||||||
|
A-->C;
|
||||||
|
B-->D;
|
||||||
|
C-->D;
|
||||||
|
|
||||||
|
{% end %}
|
||||||
|
|
||||||
|
{% mermaid() %}
|
||||||
|
|
||||||
|
```
|
||||||
sequenceDiagram
|
sequenceDiagram
|
||||||
participant Alice
|
participant Alice
|
||||||
participant Bob
|
participant Bob
|
||||||
|
|
@ -145,6 +157,25 @@ Note right of John: Rational thoughts <br/>prevail!
|
||||||
John-->>Alice: Great!
|
John-->>Alice: Great!
|
||||||
John->>Bob: How about you?
|
John->>Bob: How about you?
|
||||||
Bob-->>John: Jolly good!
|
Bob-->>John: Jolly good!
|
||||||
|
```
|
||||||
|
|
||||||
|
{% end %}
|
||||||
|
|
||||||
|
{% mermaid() %}
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
gitGraph
|
||||||
|
commit
|
||||||
|
commit
|
||||||
|
branch develop
|
||||||
|
commit
|
||||||
|
commit
|
||||||
|
commit
|
||||||
|
checkout main
|
||||||
|
commit
|
||||||
|
commit
|
||||||
|
```
|
||||||
|
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
## Admonition
|
## Admonition
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
<pre class="mermaid bg-white">
|
<pre class="mermaid bg-white">
|
||||||
{{ body }}
|
{{ body | trim_start_matches(pat="```mermaid") | trim_start_matches(pat="```") | trim_end_matches(pat="```") }}
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue