8000 Mermaid diagrams don't render inside closed Details elements · Issue #3559 · squidfunk/mkdocs-material · GitHub
[go: up one dir, main page]

Skip to content

Mermaid diagrams don't render inside closed Details elements #3559

@lampensau

Description

@lampensau

Contribution guidelines

I've found a bug and checked that ...

  • ... 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:

grafik

Steps to reproduce

  1. 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!];
    ```
  1. Build the document.
  2. Visit document with chromium-based browser.

Package versions

  • Python: 3.9.2
  • MkDocs: 1.2.3
  • Material: 8.1.10+insiders.4.8.1

Configuration

site_name: My Docs
theme: material
markdown_extensions:
  - pymdownx.superfences:
      custom_fences:
        - name: mermaid
          class: mermaid
          format: !!python/name:pymdownx.superfences.fence_code_format

System information

  • Operating system: Debian 11, Windows 10
  • Browser: Chrome 98, Edge 98

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0