Skip to content

[Bug] When using configuration pymdownx.superfences, markmap cannot be displayed correctly #74

@Xiaokang2022

Description

@Xiaokang2022

According to https://squidfunk.github.io/mkdocs-material/reference/diagrams/#configuration: In order to use mermaid, it is necessary to add this configuration option. If this configuration option is used, markmap will not display correctly.

But actually, I'm not completely sure this is a bug. The configuration given by mkdocs-material is like this:

markdown_extensions:
  - pymdownx.superfences:
      custom_fences:
        - name: mermaid
          class: mermaid
          format: !!python/name:pymdownx.superfences.fence_code_format

If you want mermaid and markmap to work at the same time, you need to change it like this:

markdown_extensions:
  - pymdownx.superfences:
      custom_fences:
        - name: mermaid
          class: mermaid
          format: !!python/name:pymdownx.superfences.fence_code_format
        - name: markmap
          class: language-markmap
          format: !!python/name:pymdownx.superfences.fence_code_format

I don’t know if writing it this way might cause other issues, but either way, maybe this should be mentioned in the README? Or is there a better way to solve this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions