Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving an edited Graph as Mermaid / AST manipulation #2208

Open
v4dkou opened this issue Jul 28, 2021 · 0 comments
Open

Saving an edited Graph as Mermaid / AST manipulation #2208

v4dkou opened this issue Jul 28, 2021 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@v4dkou
Copy link

v4dkou commented Jul 28, 2021

Is your feature request related to a problem? Please describe.
There are cases when diagram definitions get outdated in a way that's predictable enough to warrant automated updates of them.

For instance, we use Gantt diagrams to pre-plan projects. If the start date of a project is postponed for whatever reason, we need to shift all dates for milestones by a specified amount of time.

Describe the solution you'd like
Ideally, I would write a script that parses Mermaid definitions, processes them and saves back, but I haven't found such an API in Mermaid.

Describe alternatives you've considered
As of now, for shifting a Gantt diagram, I look for dateFormat and use RegEx to find strings according to the pattern.

However, this could be error-prone (for instance, if dates are also included in comments to refer to some specific date).
Also, if I am ever to write more scripts for Mermaid manipulation, I would like to have a unified API, rather than inventing tricks for each scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant