-
Notifications
You must be signed in to change notification settings - Fork 94
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
base: master
Are you sure you want to change the base?
Conversation
# 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" |
There was a problem hiding this comment.
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}"> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
I currently get the problem of: 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. |
@mgaitan do you have time to look into this and release this eventually? |
@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. |
@alvarmaciel sorry to bump this issue - but could you take a look at the broken zoom feature? |
With this PR we can use the new initialization
https://mermaid.js.org/intro/#installation