mjbvz / vscode-markdown-mermaid

Adds Mermaid diagram and flowchart support to VS Code's builtin markdown preview
https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid
MIT License
630 stars 112 forks source link

line breaks not respected #257

Open hamad12a opened 1 month ago

hamad12a commented 1 month ago

supported line breaks from Katex \newline and \\ ignored by the preview extension

mjbvz commented 1 month ago

Please share a complete example

hamad12a commented 1 month ago

Let's assume a short markdown file written and outputted as shown below without any line breaks:

image)

Now, using line breaks \n:

image

Or using \\ instead:

image

mjbvz commented 1 month ago

Please share it as text so I can easily test it

hamad12a commented 1 month ago
```mermaid
%%{ init: { 'flowchart': { 'curve': '' } } }%%
flowchart TD
    A("break the equation from the text: $$\\ a+b=c$$")
    B("break the equation from the text: $$a+b=c$$")

    style space1 fill:#0,stroke:#333,stroke-width:4px

    subgraph space1["`**Title:**`"]
    A --> B
    end
```