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

Add new initialization #133

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

alvarmaciel
Copy link

With this PR we can use the new initialization
https://mermaid.js.org/intro/#installation

tests/test_html.py Outdated Show resolved Hide resolved
# Add required JavaScript
if not app.config.mermaid_version:
_mermaid_js_url = None # assume it is local
elif app.config.mermaid_version == "latest":
_mermaid_js_url = "https://unpkg.com/mermaid/dist/mermaid.min.js"
_mermaid_js_url = "https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs"
Copy link
Owner

Choose a reason for hiding this comment

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

update the readme in mermaid_version where the CDN is mentioned

@@ -234,24 +234,24 @@ def _render_mm_html_raw(
self, node, code, options, prefix="mermaid", imgcls=None, alt=None
):
if "align" in node and "zoom_id" in node:
tag_template = """<div align="{align}" id="{zoom_id}" class="mermaid align-{align}">
tag_template = """<pre align="{align}" id="{zoom_id}" class="mermaid align-{align}">
Copy link
Owner

Choose a reason for hiding this comment

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

the change of the element type, doesn't affect when zoom is enabled? check mermaid_d3_zoom

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it affects. Next commit with the fix

@maurerle
Copy link

I currently get the problem of: Uncaught ReferenceError: mermaid is not defined

This broke some day in the last few months.

https://assume.readthedocs.io/en/latest/market_config.html

I tested this fix, which worked smoothly.
It would be very good to have this on the main branch.

@maurerle
Copy link

maurerle commented Feb 6, 2024

@mgaitan do you have time to look into this and release this eventually?

@mgaitan
Copy link
Owner

mgaitan commented Feb 6, 2024

@maurerle sure!

the only blocker AFAIK is the zoom feature, that's broken in this branch.

@alvarmaciel is a good friend, his on holidays but I will coordinate with him ASAP.

@maurerle
Copy link

@alvarmaciel sorry to bump this issue - but could you take a look at the broken zoom feature?
Would be cool to have this fixed directly in pypi :)

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

Successfully merging this pull request may close these issues.

None yet

3 participants