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

Mermaid diagram parse error #4

Closed
imorrish opened this issue Jul 31, 2023 · 4 comments
Closed

Mermaid diagram parse error #4

imorrish opened this issue Jul 31, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@imorrish
Copy link

imorrish commented Jul 31, 2023

My logic app results in the following mermaid diagram which has
Parse error on line 3:
... subgraph For_each_|_Smart_Guest_Manage -----------------------^ Expecting 'SEMI', 'NEWLINE', 'SPACE', 'EOF', 'GRAPH', 'DIR', 'subgraph', 'SQS', 'end', 'AMP', 'ALPHA', 'COLON', 'TAGEND', 'START_LINK', 'STYLE', 'LINKSTYLE', 'CLASSDEF', 'CLASS', 'CLICK', 'DOWN', 'UP', 'DEFAULT', 'NUM', 'COMMA', 'MINUS', 'BRKT', 'DOT', 'PCT', 'TAGSTART', 'PUNCTUATION', 'UNICODE_TEXT', 'PLUS', 'EQUALS', 'MULT', 'UNDERSCORE', got 'PIPE'

Diagram output is:
`

graph TB
    Trigger
    subgraph For_each_|_Smart_Guest_Management_|_Items
    direction TB
        Create_item_|_Smart_Guest_Management_Archive_|_Item
        Delete_item_|_Smart_Guest_Management
    end
    Get_items_|_Smart_Guest_Management --> For_each_|_Smart_Guest_Management_|_Items
    For_each_|_Smart_Guest_Management_|_Items --> Create_item_|_Smart_Guest_Management_Archive_|_Item
    Create_item_|_Smart_Guest_Management_Archive_|_Item --> Delete_item_|_Smart_Guest_Management
    Trigger --> Get_items_|_Smart_Guest_Management

`

@stefanstranger
Copy link
Owner

Hi Ian,

Thanks for using my logicappsdocs solution 🙏and helping me with fixing issues. Your issue is being caused by the pipe character "|" in the names of your Logic App Actions.

Mermaid cannot handle certain characters. When I removed the pipe character from the Mermaid code it worked as expected.

See here in the Mermaid live editor

The way to resolve this is that I add a search and replace action for all the actions that contain this character. Are you fine with that solution?

Regards,
Stefan

@stefanstranger stefanstranger self-assigned this Aug 1, 2023
@stefanstranger stefanstranger added the bug Something isn't working label Aug 1, 2023
@imorrish
Copy link
Author

imorrish commented Aug 1, 2023

Thanks for looking into that. I had found plenty of other examples regarding "special characters" but guess | is too special. I'

@imorrish imorrish closed this as completed Aug 1, 2023
@stefanstranger
Copy link
Owner

Let me re-open the issue and close it when I've implemented the fix.

@stefanstranger
Copy link
Owner

Closed after merging branch that fixed the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants