Terramaid icon indicating copy to clipboard operation
Terramaid copied to clipboard

Parse Error when rendering

Open guicane opened this issue 1 year ago • 3 comments

Describe the bug Trying Terramaid for the first time and when seeing the preview in IntelliJ with the mermaid plugin installed I get a parse error. Relatively simple terraform configuration. Seems to fail when loading the google cloud terraform module.

Parse error on line 5:
...		subgraph Provider[\Registry.terraform
----------------------^
Expecting 'SEMI', 'NEWLINE', 'SPACE', 'EOF', 'GRAPH', 'DIR', 'subgraph', 'SQS', 'end', 'AMP', 'COLON', 'START_LINK', 'STYLE', 'LINKSTYLE', 'CLASSDEF', 'CLASS', 'CLICK', 'DOWN', 'UP', 'NUM', 'NODE_STRING', 'BRKT', 'MINUS', 'MULT', 'UNICODE_TEXT', got 'INVTRAPSTART'

To Reproduce Preview the output file Terramaid.md in IntelliJ (with mermaid extension installed) throws the error.

Expected behavior I should be able to see the graph.

Screenshots Screenshot 2024-08-29 at 12 26 42

guicane avatar Aug 29 '24 11:08 guicane

Thanks for reporting this @guicane. Is there any way you would be able to provide the markdown in this thread so I can copy it out and work on a fix?

RoseSecurity avatar Sep 04 '24 14:09 RoseSecurity

Tracking this: https://linear.app/rosesecurity/issue/DEV-10/parse-error-when-rendering

RoseSecurity avatar Oct 24 '24 14:10 RoseSecurity

I initially attempted a quick fix for this without success, but it is my next priority to get this working in a better way. I think it may require a major rewrite of how the logic converts DOT into Mermaid, but it is best for the longevity of the project to accomplish this in a cleaner and more sustainable way.

Thank you for your patience!

RoseSecurity avatar Nov 13 '24 18:11 RoseSecurity

@guicane Just checking in if this parsing error has been resolved by the latest release. If you get a chance to test it again, feel free to reach out!

RoseSecurity avatar Sep 24 '25 19:09 RoseSecurity