mirror of
https://github.com/SebastianStork/kita.git
synced 2026-01-21 13:21: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,17 +134,48 @@ Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and ot
|
|||
## Mermaid
|
||||
|
||||
{% mermaid() %}
|
||||
|
||||
graph TD;
|
||||
A-->B;
|
||||
A-->C;
|
||||
B-->D;
|
||||
C-->D;
|
||||
|
||||
{% end %}
|
||||
|
||||
{% mermaid() %}
|
||||
|
||||
```
|
||||
sequenceDiagram
|
||||
participant Alice
|
||||
participant Bob
|
||||
Alice->>John: Hello John, how are you?
|
||||
loop Healthcheck
|
||||
John->>John: Fight against hypochondria
|
||||
end
|
||||
Note right of John: Rational thoughts <br/>prevail!
|
||||
John-->>Alice: Great!
|
||||
John->>Bob: How about you?
|
||||
Bob-->>John: Jolly good!
|
||||
participant Alice
|
||||
participant Bob
|
||||
Alice->>John: Hello John, how are you?
|
||||
loop Healthcheck
|
||||
John->>John: Fight against hypochondria
|
||||
end
|
||||
Note right of John: Rational thoughts <br/>prevail!
|
||||
John-->>Alice: Great!
|
||||
John->>Bob: How about you?
|
||||
Bob-->>John: Jolly good!
|
||||
```
|
||||
|
||||
{% end %}
|
||||
|
||||
{% mermaid() %}
|
||||
|
||||
```mermaid
|
||||
gitGraph
|
||||
commit
|
||||
commit
|
||||
branch develop
|
||||
commit
|
||||
commit
|
||||
commit
|
||||
checkout main
|
||||
commit
|
||||
commit
|
||||
```
|
||||
|
||||
{% end %}
|
||||
|
||||
## Admonition
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<pre class="mermaid bg-white">
|
||||
{{ body }}
|
||||
{{ body | trim_start_matches(pat="```mermaid") | trim_start_matches(pat="```") | trim_end_matches(pat="```") }}
|
||||
</pre>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue