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

classDiagram doesn't allow colons in class names #1635

Closed
init-dcat-ap-de opened this issue Aug 21, 2020 · 11 comments
Closed

classDiagram doesn't allow colons in class names #1635

init-dcat-ap-de opened this issue Aug 21, 2020 · 11 comments

Comments

@init-dcat-ap-de
Copy link

I'm trying to use mermaid for creating an class diagram in a semantic web context. There, colons are needed for prefixes:

classDiagram
    class dcat:Dataset {
        <<mandatory>>
    }

Also an issue for @persidskiy , see #1266 (comment)

@mmngreco
Copy link

mmngreco commented Oct 7, 2020

@init-dcat-ap-de and @persidskiy, Did you find any workaround for this ?

@init-dcat-ap-de
Copy link
Author

@mmngreco
Unfortunately yes: Switching to PlantUML.

@jgreywolf
Copy link
Contributor

I will focus on this issue and see if I can make it work

@jgreywolf jgreywolf removed the Status: Triage Needs to be verified, categorized, etc label Feb 2, 2021
@jgreywolf
Copy link
Contributor

@mmngreco This issue should be resolved after #1877 PR has been merged...

@aharth
Copy link

aharth commented Mar 30, 2022

Would be nice to be able to use colons in relationship labels too.

Backticks on relationship labels do not seem to work on mermaid.live.

I would like to use the CURIE rdf:type (instead of type):

classDiagram
  `rdfs:Resource` --> `rdfs:Class`:type

@jgreywolf
Copy link
Contributor

@aharth the code that you provided works in mermaid live as of 03/17/2023 - I am not sure when this changed, but it is possible to use : in names for classes as well as relationships

@aharth
Copy link

aharth commented Mar 18, 2023

@jgreywolf, do you have an example for using : in relationships?

The following does not work for me on mermaid live:

classDiagram
  `rdfs:Resource` --> `rdfs:Class`:`rdf:type`

@jgreywolf
Copy link
Contributor

Do you mean like this?
Live Editor

@aharth
Copy link

aharth commented Mar 24, 2023

I would need colons also in the labels of the edges.

E.g., Con:tains.

@aharth
Copy link

aharth commented Jun 6, 2023

So the issue is actually not resolved.

@mProjectsCode
Copy link

mProjectsCode commented Jul 19, 2023

I am facing the same issue. It would be nice if we were able to define strings delimited by '`' for labels too. This would allow the usage of : in the label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants