Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malformed subgraph name in Mermaid render #337

Closed
pieterb opened this issue Sep 18, 2024 · 0 comments
Closed

Malformed subgraph name in Mermaid render #337

pieterb opened this issue Sep 18, 2024 · 0 comments
Labels

Comments

@pieterb
Copy link

pieterb commented Sep 18, 2024

Expected

For a group named identity provider (IDP) in the DSL, I expect valid Mermaid output.

Actual

The generated mmd contains:

subgraph group1 [identity provider (IdP)]
    ...
end

Mermaid chokes on this because of the parentheses "()".

Steps to reproduce

create the following dsl:

workspace {
    model {
        ss = softwareSystem "MySoftware" {
            group "identity provider (IdP)" {
                keycloak = container "KeyCloak"
            }
        }
    }
}

Export it to Mermaid, then try to render output file structurizr-Container-001.mmd.

Version/build information

structurizr-cli: 2024.07.03
structurizr-java: 2.2.0
structurizr-dsl: 2.2.0
structurizr-export: 2.2.0
structurizr-import: v2.2.0
Java: 22.0.2/Homebrew (/usr/local/Cellar/openjdk/22.0.2/libexec/openjdk.jdk/Contents/Home)
OS: Mac OS X 13.6.9 (x86_64)

Severity

Major

Priority

I have no budget and there's no rush, please fix this for free

More information

It would be safer to put the group name in quotes, as in:

subgraph group1 ["identity provider (IdP)"]
    ...
end

More in general, quoting and escaping for Mermaid could be improved, not only for groups, but for all elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant