mermaid-js / mermaid-cli

Command line tool for the Mermaid library
MIT License
2.39k stars 227 forks source link

No diagram found in mardown file when using whitespace in definition. #705

Open nklsla opened 3 months ago

nklsla commented 3 months ago

Describe the bug When trying to generate images from a markdown (.md) file the CLI does not recognize the mermaid definiton.

To Reproduce Steps to reproduce the behavior:

Install and run the docker alternative using docker run --rm -u `id -u`:`id -g` -v /path/to/diagrams:/data minlag/mermaid-cli -i diagram.mmd

Define the mermaid diagram in the markdown file with a whitespace like so:

::: mermaid
graph TD
..
:::

Expected behavior To get an generated image

Desktop (please complete the following information):

Additional context Either this could be fixed or made clear in documentation/help command from the CLI.

If only documentation is needed I could do a PR myself.