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

fix: Mermaid diagram rendering in Reveal slides #2765

Merged
merged 3 commits into from Aug 14, 2022

Conversation

malmarz
Copy link
Contributor

@malmarz malmarz commented Jul 5, 2022

This is an improved fix for improperly rendering mermaid diagrams in Reveal slides if included beyond the 3rd slide.

It also includes update to latest version of mermaid.

Please note the patch has not tested

As it's been a while since I setup a wowchemy dev environment. With no clear instruction or easy path to do so, the hassle is too great for me for such a simple and useful patch. So I would rather at least the community know of this fix and incorporate it if someone can easily test it.

The discussion on this fix from the Reveal repo can be found here:
hakimel/reveal.js#2863 (comment)

I hope it works and you all find it useful

Many thanks for the great effort

@netlify
Copy link

netlify bot commented Jul 5, 2022

Deploy Preview for hugo-portfolio-theme ready!

Name Link
🔨 Latest commit ed1063f
🔍 Latest deploy log https://app.netlify.com/sites/hugo-portfolio-theme/deploys/62f8e26f91adcc000806adb3
😎 Deploy Preview https://deploy-preview-2765--hugo-portfolio-theme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jul 5, 2022

Deploy Preview for markdown-slides ready!

Name Link
🔨 Latest commit ed1063f
🔍 Latest deploy log https://app.netlify.com/sites/markdown-slides/deploys/62f8e26f91adcc000806adae
😎 Deploy Preview https://deploy-preview-2765--markdown-slides.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@malmarz
Copy link
Contributor Author

malmarz commented Jul 11, 2022

ok managed to test the patch by:
1- running the included starter slides and added the missing slides.diagram option in index.md (otherwise the diagrams will not render)
2- used replace directive in go.mod to run the local version

tested a few complex diagrams and all seem to render perfectly

Copy link
Collaborator

@gcushen gcushen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, no one familiar with Reveal has reviewed the code in this PR yet. However, I understand Rodri tested the PR (via Discord) and found no issues. In the interests of making this improvement available to other users and not lost to merge conflicts, let's merge it and later consider reverting if any issues reported.

P.S. for future reference, please submit a separate PR for each issue (e.g. you bundled a Reveal upgrade into this PR).

@gcushen gcushen merged commit 76c4851 into HugoBlox:main Aug 14, 2022
@gcushen gcushen changed the title improved fix for mermaid diagrams in reveal slides fix: Mermaid diagram rendering in Reveal slides Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants