huynd2210 / GraphToMermaid

Convert any graph-like data structures to mermaid code and vice versa.
1 stars 0 forks source link

Add support for text on links #3

Closed huynd2210 closed 2 months ago

huynd2210 commented 2 months ago

Add support for mermaid code with texts on links. Ideally, should extract nodes, edges and the text from the mermaid.

Reference: https://mermaid.js.org/syntax/flowchart.html#text-on-links

Dauphong123 commented 2 months ago

Solution: Use Regex

a -- description --- will use r'--\s(.+?)\s--- to identify description

use regex to identify if description in text or not