mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
72.77k stars 6.64k forks source link

Proposal to Add Nassi-Schneiderman Diagram Support to Mermaid.js #4503

Open grafst opened 1 year ago

grafst commented 1 year ago

Proposal

I would like to suggest adding support for Nassi-Schneiderman diagrams to Mermaid.js. Nassi-Schneiderman diagrams are a graphical representation of the structure of a program, commonly used for flowcharting and designing structured programs. The addition of this diagram type would enhance the versatility and functionality of Mermaid.js, allowing users to create Nassi-Schneiderman diagrams directly using Markdown syntax.

Use Cases

  1. Software Development: Nassi-Schneiderman diagrams are widely used in software development to design and visualize the flow of control within a program. By incorporating this diagram type into Mermaid.js, developers can efficiently communicate and document program structures, improving code understanding and collaboration.

  2. Algorithm Design: Nassi-Schneiderman diagrams provide a visual representation of algorithms, aiding in the design and analysis of complex processes. With support for Nassi-Schneiderman diagrams in Mermaid.js, researchers and algorithm designers can conveniently create and share algorithmic designs.

Screenshots

Syntax

nassi
    if (condition) then
        operation1
        operation2
    else
        operation3
    endif
    operation4
    while (condition) do
        operation5
    endwhile
    operation6
endnassi

Implementation

This is a proposal which I'd love to see built into mermaid by the wonderful community.

sidharthv96 commented 1 year ago

Some examples available at https://en.wikipedia.org/wiki/Nassi%E2%80%93Shneiderman_diagram