mkdocs-markmap icon indicating copy to clipboard operation
mkdocs-markmap copied to clipboard

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

Open Xiaokang2022 opened this issue 6 months ago • 1 comments

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?

Xiaokang2022 avatar Jul 23 '25 08:07 Xiaokang2022

I noticed that this issue seems to have been mentioned in previous issues too, but I don't know why it's popped up again.

My version of mkdocs-markmap is 2.5.2 and pymdown-extensions is 10.16.

Xiaokang2022 avatar Jul 23 '25 08:07 Xiaokang2022