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

getMessages API doesn't support Entity codes #4983

Closed
ad1992 opened this issue Oct 25, 2023 · 2 comments · Fixed by #5002
Closed

getMessages API doesn't support Entity codes #4983

ad1992 opened this issue Oct 25, 2023 · 2 comments · Fixed by #5002
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@ad1992
Copy link
Contributor

ad1992 commented Oct 25, 2023

Description

If the messages contain entity codes, they are removed when using the diagram.parser.yy.getMessages API

Steps to reproduce

copy the below mermaid syntax and use diagram.parser.yy.getMessages

sequenceDiagram
    A->>B: I #9829; you!
    B->>A: I #9829; you #infin; times more!

when using ``diagram.parser.yy.getMessages` 👇🏻

[
    {
        "from": "A",
        "to": "B",
        "message": "I",
        "wrap": false,
        "type": 0
    },
    {
        "from": "B",
        "to": "A",
        "message": "I",
        "wrap": false,
        "type": 0
    }
]

As you can see the message n attribute just contains the character I

Screenshots

No response

Code Sample

No response

Setup

  • Mermaid version: 10.2.3

Suggested Solutions

No response

Additional Context

No response

@ad1992 ad1992 added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Oct 25, 2023
@ad1992
Copy link
Contributor Author

ad1992 commented Oct 31, 2023

Was looking into this and this is what I got so far 👇🏻

When apply is being triggered the message data already doesn't have entity codes so probably something wrong is going on with the jison parser, however I tried to parse explicitly with jison parser -https://bramp.github.io/js-sequence-diagrams/ and it works well.

I am not familiar with the jison grammar so would appreciate any further leads 🙏

@manojkumar20k3
Copy link

If this issue is still open ,I would love to contribute. Please assign it to me, So that i can start my first contribution.

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: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants