From e4acca24ebd45b68b8b1040df2fa68a510c99b53 Mon Sep 17 00:00:00 2001 From: Piotr Justyna Date: Tue, 21 May 2024 15:40:26 +0000 Subject: [PATCH] syntax proposal --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index cdb4d9c..34473eb 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,38 @@ Haskell drakon renderer. ![diagram](./diagram-troubleshooting-on.svg) +## syntax + +Proposed input syntax to be converted to diagram images: + +``` +icon "start" as start +icon "action 1" as action1 +icon "end" as end + +start > action1 +action1 > end +``` + +This would render something like: + +```mermaid +stateDiagram-v2 +state "start" as start +state "action 1" as action1 +state "end" as end + +start --> action1 +action1 --> end +``` + +So two sections: + +* icon definitions +* icon connections + +But this is subject to change. + ## terminology * title - first step of a diagram