Skip to content
New issue

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

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

Already on GitHub? # to your account

first or last letter dropped for links with open arrows #2492

Open
dennisl68-castra opened this issue Nov 16, 2021 · 4 comments
Open

first or last letter dropped for links with open arrows #2492

dennisl68-castra opened this issue Nov 16, 2021 · 4 comments
Labels
Graph: Flow Internals: Parser Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@dennisl68-castra
Copy link

dennisl68-castra commented Nov 16, 2021

The diagram below doesn't produce my intended graph.

flowchart LR
    dev---ops

image
See live editor

The behaviour ought to be the same as when using

flowchart LR
    dev --- ops

image

or

flowchart LR
    Dev---Ops

image

This issue is by design and I don't see an easy way to fix it except breaking the current syntax of --o-arrows or ----no-arrows links.

The same goes for

flowchart LR
    dev---xerxes

image

@dennisl68-castra dennisl68-castra added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Nov 16, 2021
@xurizaemon
Copy link

TIL that it's possible to omit the spaces bounding arrows!

I see that the docs for "o" and "x" head arrows use spaces to bound the arrows. There are a few docs examples without spaces.

As you note, bounding the arrows by spaces seems to better assist the parser in identifying the correct layout.

Is there a specific use case you have that makes non-spaced arrows of benefit? If there is a trade-off in parser complexity (or effort) versus syntax, another solution here might be clarifying docs to recommend spaces.

@dennisl68-castra
Copy link
Author

No use case other then it's somewhat confusing.

LetMeFly666 added a commit to LetMeFly666/Re2DFA that referenced this issue Apr 5, 2022
LetMeFly666 referenced this issue in LetMeFly666/Re2DFA Apr 5, 2022
@jgreywolf
Copy link
Contributor

FYI - In doing some work on visual editor for Mermaid Chart last week, I noticed that this happens to an edge label if an "o" or an "x" is at the end of the text as well. We will be prioritizing this accordingly

@jgreywolf jgreywolf self-assigned this Dec 5, 2023
@jgreywolf jgreywolf changed the title Linking to a node without out arrows having a label starting with an 'o' alters the intended output first or last letter dropped for links with open arrows Dec 22, 2023
@jgreywolf
Copy link
Contributor

For now please follow the workaround of including spaces around the edge/arrow definitions in order to help the parser understand the difference between arrows. I am continuing to work on this to see if there is a better way, but so far nothing brilliant has occurred.

I will also look at updating the documentation

@jgreywolf jgreywolf removed their assignment Oct 31, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Graph: Flow Internals: Parser Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

4 participants