yuzutech / kroki

Creates diagrams from textual descriptions!
https://kroki.io
MIT License
2.78k stars 206 forks source link

for mermaid, sometimes the right margin is too small #1736

Open imysl0 opened 2 months ago

imysl0 commented 2 months ago

Using Kroki, there is a blur at the arrow, indicating that the right margin is too small image Using mermaid, no blur image

this is code:

---
title: ABCD_TOPL_ID mermaid
---
stateDiagram-v2
[*] --> ABCD_L_L0
ABCD_L_L0 --> ABCD_L_L1
ABCD_L_L0 --> ABCD_L_LT
ABCD_L_L1 --> ABCD_L_L2
ABCD_L_L1 --> ABCD_L_LT
ABCD_L_L2 --> ABCD_L_L3
ABCD_L_L2 --> ABCD_L_LT
ABCD_L_L3 --> ABCD_L_LT
ABCD_L_LT --> [*] 
imysl0 commented 2 months ago
---
title: ABCD_TOPL_ID mermaid
---
stateDiagram-v2
[*] --> ABCD_L_L0
ABCD_L_L0 --> ABCD_L_L1
ABCD_L_L0 --> ABCD_L_LT
ABCD_L_L1 --> ABCD_L_L2
ABCD_L_L1 --> ABCD_L_LT
ABCD_L_L2 --> ABCD_L_L3
ABCD_L_L2 --> ABCD_L_LT
ABCD_L_L3 --> ABCD_L_LT
ABCD_L_LT --> [*] 
gladykov commented 3 days ago

Another example:

classDiagram

class MQTTDevice {
    -deviceCount: int
    -idiotDevices: mqttDevice_t[]

    +mqtt_handleApplianceMessage(string, string, mqttDevice_t) void 
    +mqtt_deviceGetVersionJson(string, size_t, mqttDevice_t) bool 
    +mqtt_getDeviceCount() int 
    +mqtt_getDeviceBySerial(string) mqttDevice_t
    +mqtt_getDeviceByIndex(int) mqttDevice_t
    +mqtt_registerIdiotDevice(idiot_device_t) void 
    -_getTopicHandler(string, mqttDevice_t) msgHandler_t
    -_controlMsgHandler(json_t, mqttDevice_t) void
}

results in:

image