getzola / zola

A fast static site generator in a single binary with everything built-in. https://www.getzola.org
https://www.getzola.org
MIT License
13.59k stars 949 forks source link

.md within mermaid can't be build a correct form in html #2213

Open dorname opened 1 year ago

dorname commented 1 year ago

Bug Report

Environment

Zola version:0.17.2

Expected Behavior

expect mermaid form in html md:

flowchart TB
root["整型"]
eight["8位"]
sixtheen["16位"]
thirty_two["32位"]
sixty_four["64位"]
one_hundred["128位"]
arch["arch"]
signed_8["i8"]
signed_16["i16"]
signed_32["i32"]
signed_64["i64"]
signed_128["i28"]
arch_i["isize"]
unsigned_8["u8"]
unsigned_16["u16"]
unsigned_32["u32"]
unsigned_64["u64"]
unsigned_128["u128"]
arch_u["usize"]
root-->eight;
root-->sixtheen;
root-->thirty_two;
root-->sixty_four;
root-->one_hundred;
root-->arch
eight-->signed_8;
eight-->unsigned_8;
sixtheen-->signed_16;
sixtheen-->unsigned_16;
thirty_two-->signed_32;
thirty_two-->unsigned_32;
sixty_four-->signed_64;
sixty_four-->unsigned_64;
one_hundred-->signed_128;
one_hundred-->unsigned_128;
arch-->arch_i["isize"];
arch-->arch_u["usize"];

html that I expect : \<pre data-lang="mermaid" style="background-color:#2b303b;color:#c0c5ce;" class="language-mermaid ">\<code class="mermaid" data-lang="mermaid"> flowchart TB root["整型"] eight["8位"] sixtheen["16位"] thirty_two["32位"] sixty_four["64位"] one_hundred["128位"] arch["arch"] signed_8["i8"] signed_16["i16"] signed_32["i32"] signed_64["i64"] signed_128["i28"] arch_i["isize"] unsigned_8["u8"] unsigned_16["u16"] unsigned_32["u32"] unsigned_64["u64"] unsigned_128["u128"] arch_u["usize"] root-->eight; root-->sixtheen; root-->thirty_two; root-->sixty_four; root-->one_hundred; root-->arch eight-->signed_8; eight-->unsigned_8; sixtheen-->signed_16; sixtheen-->unsigned_16; thirty_two-->signed_32; thirty_two-->unsigned_32; sixty_four-->signed_64; sixty_four-->unsigned_64; one_hundred-->signed_128; one_hundred-->unsigned_128; arch-->arch_i["isize"]; arch-->arch_u["usize"]; \</code>\</pre>

Current Behavior

actully it got tag \<pre data-lang="mermaid" style="background-color:#2b303b;color:#c0c5ce;" class="language-mermaid ">\<code class="language-mermaid" data-lang="mermaid">\<span>flowchart TB \</span>\<span>root["整型"] \</span>\<span>eight["8位"] \</span>\<span>sixtheen["16位"] \</span>\<span>thirty_two["32位"] \</span>\<span>sixty_four["64位"] \</span>\<span>one_hundred["128位"] \</span>\<span>arch["arch"] \</span>\<span>signed_8["i8"] \</span>\<span>signed_16["i16"] \</span>\<span>signed_32["i32"] \</span>\<span>signed_64["i64"] \</span>\<span>signed_128["i28"] \</span>\<span>arch_i["isize"] \</span>\<span>unsigned_8["u8"] \</span>\<span>unsigned_16["u16"] \</span>\<span>unsigned_32["u32"] \</span>\<span>unsigned_64["u64"] \</span>\<span>unsigned_128["u128"] \</span>\<span>arch_u["usize"] \</span>\<span>root-->eight; \</span>\<span>root-->sixtheen; \</span>\<span>root-->thirty_two; \</span>\<span>root-->sixty_four; \</span>\<span>root-->one_hundred; \</span>\<span>root-->arch \</span>\<span>eight-->signed_8; \</span>\<span>eight-->unsigned_8; \</span>\<span>sixtheen-->signed_16; \</span>\<span>sixtheen-->unsigned_16; \</span>\<span>thirty_two-->signed_32; \</span>\<span>thirty_two-->unsigned_32; \</span>\<span>sixty_four-->signed_64; \</span>\<span>sixty_four-->unsigned_64; \</span>\<span>one_hundred-->signed_128; \</span>\<span>one_hundred-->unsigned_128; \</span>\<span>arch-->arch_i["isize"]; \</span>\<span>arch-->arch_u["usize"]; \</span>\<span> \</span>\</code>\</pre>

Step to reproduce

Please provide the steps to reproduce the issue. If the issue is hard to reproduce, please provide a sample repository or sample that triggers the bug.

Keats commented 1 year ago

We don't support mermaid so I'm not sure what is expected there. Is it a feature request for mermaid support?

dorname commented 1 year ago

We don't support mermaid so I'm not sure what is expected there. Is it a feature request for mermaid support? yes I want a feature for mermaid support Support mermaid expect codeblock in \<pre>\<code>\</code>\</pre> without those tags \<span>

dorname commented 1 year ago

will support mermaid?

Keats commented 1 year ago

Not planned for now