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

[bug report] URI fragments in links are discarded if the link value is not quoted #2239

Open
pmoura opened this issue Dec 7, 2024 · 1 comment

Comments

@pmoura
Copy link

pmoura commented Dec 7, 2024

URI fragments in links are discarded if the link value is not quoted. For example:

"file_footer/3_": {
shape: rectangle
style.fill: cornsilk
style.stroke-dash: 0
link: https://github.com/LogtalkDotOrg/logtalk3/tree/330727f23afc4fcefe919b0a95e112fe8c898d69/tools/diagrams/d2_graph_language.lgt#L123
label: ""
text: |md
## file_footer/3
#### local
|
}

The #L123 fragment is missing in the SVG output when the value of link as in the example above is not quoted. Wondering if this a bug or a character escape issue? In any case, I suggest at least updating the documentation on link to advise quoting the values to preserve the URI fragments.

@cyborg-ts cyborg-ts added this to D2 Dec 7, 2024
@pmoura pmoura changed the title [bug report] URI fragments in links are discarded [bug report] URI fragments in links are discarded if the link value is not quoted Dec 7, 2024
@bo-ku-ra
Copy link
Contributor

and

  # comment

  foo: {
    shape: class
    \# bar: \#protected
  }

the use of the '#' is complicated.

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

2 participants