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

d2oracle: How to Set a Markdown label? #2267

Open
NorbertHauriel opened this issue Jan 3, 2025 · 0 comments
Open

d2oracle: How to Set a Markdown label? #2267

NorbertHauriel opened this issue Jan 3, 2025 · 0 comments

Comments

@NorbertHauriel
Copy link

NorbertHauriel commented Jan 3, 2025

I am trying to programmatically create D2 diagrams, using d2oracle package.
But when calling d2oracle.Set to add Markdown labels, it always inserts the Markdown as a regular, quoted string:

value := `|md
# MyTitle
testing this markdown syntax
`
graph, _ = d2oracle.Set(graph, nil, "mykey.label", nil, &value)

Can I work around this in an intuitive way, or did I miss something?

Thanks for creating D2!

@cyborg-ts cyborg-ts added this to D2 Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant