Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-DIAG-017

The Mermaid action inserts a starter flowchart in GFM mode

When a writer picks the Mermaid action of the edition palette or the Mermaid slash entry, which the extension offers in GFM mode only, the extension SHALL insert a fenced mermaid block with a top-down flowchart from a node labelled Start to a node labelled End, set apart from the text around it and placed after the selection, with the label Start selected.

Step 1 of path 1 in StRS-MDOKFSTUDIO-DIAG-001: from “Edit mode is on with the GFM palette” to “A Mermaid fence is in the document”.

Scenarios 4

The situations the tests check; open one to read it.

nominalInsert after text
Giventhe caret at the end of a paragraph
Whenthe writer picks Mermaid
Thena blank line and the fenced mermaid flowchart are inserted after the selection and the word Start is selected
boundaryEmpty document
Givenan empty document
Whenthe writer picks Mermaid
Thenthe fence is inserted with no leading blank line and the word Start is selected
nominalGFM mode offers Mermaid
Giventhe edition palette in GFM mode on a block selection
Whenthe palette is shown and the writer types /diagram in the slash menu
Thena one-click Mermaid button with the tooltip "Mermaid diagram" is in the GitHub group and the slash menu finds Mermaid first; the slash aliases are diagram, chart, graph and flowchart
refusalOther palette modes do not offer Mermaid
Giventhe palette in Strict or MyST mode
Whenthe palette is shown
Thenno Mermaid action is offered and no button inserts a {mermaid} directive

Implemented in 2

Tested by 5

Known limits (2)

Replaces

SwRS-MDOKFSTUDIO-DIAG-018Mermaid is offered in the GFM palette mode only superseded superseded by SwRS-MDOKFSTUDIO-DIAG-017 Markdown file