Skip to content

SVG renderer loses nesting for deeply nested if-fragments #365

@MrCoder

Description

@MrCoder

Summary

When if-fragments are nested three levels deep, the SVG renderer flattens the innermost nesting instead of preserving it. The HTML renderer handles this correctly.

Reproduction

DSL:

if(x) {
  if(y) {
    if(z) {
      A.method()
    }
  }
}

Expected (HTML renderer behaviour): Three visually nested if-fragment boxes — if(z) inside if(y) inside if(x).

Actual (SVG renderer behaviour): if(z) is rendered at the same visual level as if(y) instead of being nested inside it.

Impact

Diagrams with triple-nested conditionals are rendered incorrectly in the SVG output path.

Environment

  • Renderer: SVG only (HTML is correct)
  • Reproducible via compare-case tool: /e2e/tools/compare-case.html?case=edge-nested-if-triple
  • Edge case key in e2e/data/compare-cases.js: edge-nested-if-triple

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions