You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... the problem doesn't occur with the mkdocs or readthedocs themes
... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
... the documentation does not mention anything about my problem
... there are no open or closed issues that are related to my problem
Description
I've just noticed that my browsers based on Chromium no longer render a mermaid diagram that is residing inside a ??? note "" block. Diagrams outside of the block are rendered fine as seen in the official documentation.
Note: This problem doesn't seem to affect Firefox 96.
Expected behaviour
Diagrams should be rendered as normal regardless of being inside an admonition or details block.
Actual behaviour
Browsers throw an error inside the console:
Steps to reproduce
Create an *.md document that contains the following
??? note ""
``` mermaid
graph LR
A[Start] --> B{Error?};
B -->|Yes| C[Hmm...];
C --> D[Debug];
D --> B;
B ---->|No| E[Yay!];
```
Thanks for reporting. Fixed in 97f8233. The error is only happening for collapsed admonition elements. The reason is that Element.innerText does not return anything when elements are invisible, but Element.textContent seems to do the trick. Since Mermaid blocks are not syntax highlighted, it should be safe to switch to Element.textContent, as there's not markup for Mermaid to choke on.
squidfunk
changed the title
Mermaid diagrams don't render on Chromium based browsers
Mermaid diagrams don't render inside closed Details elements
Feb 8, 2022
Contribution guidelines
I've found a bug and checked that ...
mkdocs
orreadthedocs
themescustom_dir
,extra_javascript
andextra_css
Description
I've just noticed that my browsers based on Chromium no longer render a mermaid diagram that is residing inside a
??? note ""
block. Diagrams outside of the block are rendered fine as seen in the official documentation.Expected behaviour
Diagrams should be rendered as normal regardless of being inside an admonition or details block.
Actual behaviour
Browsers throw an error inside the console:
Steps to reproduce
*.md
document that contains the followingPackage versions
3.9.2
1.2.3
8.1.10+insiders.4.8.1
Configuration
System information
The text was updated successfully, but these errors were encountered: