structurizr / cli

A command line utility for Structurizr.
https://docs.structurizr.com/cli
Apache License 2.0
491 stars 75 forks source link

Exporting to mermaid format a example don't work #53

Closed andrzejkrawczyk closed 3 years ago

andrzejkrawczyk commented 3 years ago

@simonbrowndotje Hello,

I have used docker image from cli to generate from example a mermaid format for graph rendering.

In mermaid i passed output file by: "mmdc -i input.mmd -o output.pdf" command to check the result.

Sadly the final result is not working :( instead generating square boxes it generates html coding.

Here is file example output3.pdf

Example input dsl:

workspace {

    model {
        user = person "User"
        softwareSystem = softwareSystem "Software System" {
            webapp = container "Web Application"
            database = container "Database"
         }

        user -> webapp "Uses"
        webapp -> database "Reads from and writes to"
    }

    views {
        theme default
    }

}
simonbrowndotje commented 3 years ago

Since the diagram definitions include HTML tags, you'll need to set the securityLevel configuration parameter to loose - see https://mermaid-js.github.io/mermaid/#/./Setup?id=securitylevel

andrzejkrawczyk commented 3 years ago

@simonbrowndotje I was using the mermaid-cli for converting mermaid files to graphs. After providing json config with configuration loose it worked like a charm. Shouldn't be that in examples / readme for mermaid?