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

Mermaid preview to also support GitHub syntax [source,mermaid]? #1463

Open
gesinn-it-gea opened this issue Nov 6, 2023 · 8 comments
Open

Comments

@gesinn-it-gea
Copy link

The built-in Mermaid preview works very well in PhpStorm using a [mermaid] block. Unfortunately, on GitHub, Mermaid diagrams are only rendered if they are included with [source,mermaid]. Is there a way, to support the GitHub syntax also for this plugin?

See also:

@ahus1
Copy link
Contributor

ahus1 commented Nov 26, 2023

Thank you for investigating this. I'll have a look. Stil this seems to be a rather strange behavior on GitHub.

Did you find an issue on GitHub where this behavior for AsciiDoc is being discussed, and maybe a fix is being tracked?

@gesinn-it-gea
Copy link
Author

Thanks for looking into this! No, I am not aware of this topic being discussed on GitHub. The type of integration on GitHub with the naming of an explicit "Source" block is probably not easy to change there. If this could be changed here on the plugin side with manageable effort, that would be great!

@ahus1
Copy link
Contributor

ahus1 commented Dec 17, 2023

I had a look and tried both asciidoctor-diagram and Kroki for rendering the diagram with [source,mermaid] - none of them does. It also feels wrong, as source outputs the source code as is, and sometimes with syntax highlighting.

I see that there is a discussion to workaround with ifdef/ifndef, and I assume this is the way you'd need to go here. I don't plan to make changes to the AsciiDoc plugin while both asciidoctor-diagram and Kroki don#t support it.

I suggest you open a issue against GitHub to have it fixed on GitHub, and possibly link it here so people can follow that link. Once there is such an issue, I'll close this issue.

Please let me know what you think.

@ahus1 ahus1 self-assigned this Dec 17, 2023
@davinkevin
Copy link

Really interested by a solution to this problem too. Is there already an issue reported to GitHub?

@ahus1
Copy link
Contributor

ahus1 commented Feb 4, 2024

@davinkevin - I assume there isn't. Please go ahead and create one, and then link it here! Your efforts would be appreciated.

@davinkevin
Copy link

Done, however it doesn't appear in the UI here as a related issue…

The support request id is #2582237

@davinkevin
Copy link

And now it's here: https://github.com/orgs/community/discussions/106933

@ahus1
Copy link
Contributor

ahus1 commented Feb 10, 2024

Thank you for taking the time. I upvoted it, and I encourage everyone else interested in that to do the same.

I also added additional references.

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

3 participants